[Bug 405207] [NEW] pretzel generated noweb filter segfaults

Sam Liddicott sam at liddicott.com
Mon Jul 27 08:59:38 UTC 2009


Public bug reported:

Binary package hint: pretzel

Using pretzel 2.0n-2-0.3 on Jaunty amb64, with the attached cee.fg.patch

If I try to build a noweb C filter, like this:

pretzel-it -i -d -n cee noweave-c-filter

and then run it against the attached fullexample.nw file (in two parts
to aid debugging):

$ cat ./fullexample.nw | noweave -delay -index -filter 'tee
/tmp/pre.nwf' - > /dev/null

$ ./noweave-c-filter < /tmp/pre.nwf

then I get a segfault after the first chunk has been output, the last
few lines of console output being:

force{}\mathin {\it hp}={\it hp}\to{\it left}\mathout ;\pretzelforce{}/* look at next item of the list */\pretzeloutdent{}\pretzelforce{}\}\pretzelforce{}
@nl
@literal \end{ppcode}
Segmentation fault

gdb reports:
Program received signal SIGSEGV, Segmentation fault.
0x00007fa986436243 in free () from /lib/libc.so.6
(gdb) bt
#0  0x00007fa986436243 in free () from /lib/libc.so.6
#1  0x0000000000409a9f in prettyprint ()
#2  0x00000000004079ef in pretty (getline=0x4076d0 <get_stripped>, in=0x7fa9867286a0, putline=0x407710 <put_stripped>, out=0x7fa986728780, make_pp=0x407600 <make_pp>, cl=0x7fff8f0f7440) at pretty.nw:107
#3  0x0000000000407c27 in main (argc=<value optimized out>, argv=<value optimized out>) at pretty.nw:236

Other files report errors like:
*** glibc detected *** ./noweave-c-filter: free(): invalid pointer: 0x00000000013fd9b8 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fb20c190cb8]
/lib/libc.so.6(cfree+0x76)[0x7fb20c193276]
./noweave-c-filter[0x409a9f]
./noweave-c-filter[0x4079ef]
./noweave-c-filter[0x407c27]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7fb20c1375a6]
./noweave-c-filter[0x402459]
======= Memory map: ========
00400000-00410000 r-xp 00000000 08:06 9077609                            /home/sam/projects/pretzel/noweave-c-filter
0060f000-00610000 r--p 0000f000 08:06 9077609                            /home/sam/projects/pretzel/noweave-c-filter
00610000-00611000 rw-p 00010000 08:06 9077609                            /home/sam/projects/pretzel/noweave-c-filter
013fd000-0141e000 rw-p 013fd000 00:00 0                                  [heap]
7fb208000000-7fb208021000 rw-p 7fb208000000 00:00 0 
7fb208021000-7fb20c000000 ---p 7fb208021000 00:00 0 
7fb20c119000-7fb20c281000 r-xp 00000000 08:05 67606                      /lib/libc-2.9.so
7fb20c281000-7fb20c481000 ---p 00168000 08:05 67606                      /lib/libc-2.9.so
7fb20c481000-7fb20c485000 r--p 00168000 08:05 67606                      /lib/libc-2.9.so
7fb20c485000-7fb20c486000 rw-p 0016c000 08:05 67606                      /lib/libc-2.9.so
7fb20c486000-7fb20c48b000 rw-p 7fb20c486000 00:00 0 
7fb20c48b000-7fb20c4a1000 r-xp 00000000 08:05 29883                      /lib/libgcc_s.so.1
7fb20c4a1000-7fb20c6a1000 ---p 00016000 08:05 29883                      /lib/libgcc_s.so.1
7fb20c6a1000-7fb20c6a2000 r--p 00016000 08:05 29883                      /lib/libgcc_s.so.1
7fb20c6a2000-7fb20c6a3000 rw-p 00017000 08:05 29883                      /lib/libgcc_s.so.1
7fb20c6a3000-7fb20c727000 r-xp 00000000 08:05 67716                      /lib/libm-2.9.so
7fb20c727000-7fb20c926000 ---p 00084000 08:05 67716                      /lib/libm-2.9.so
7fb20c926000-7fb20c927000 r--p 00083000 08:05 67716                      /lib/libm-2.9.so
7fb20c927000-7fb20c928000 rw-p 00084000 08:05 67716                      /lib/libm-2.9.so
7fb20c928000-7fb20ca19000 r-xp 00000000 08:05 12305                      /usr/lib/libstdc++.so.6.0.10
7fb20ca19000-7fb20cc19000 ---p 000f1000 08:05 12305                      /usr/lib/libstdc++.so.6.0.10
7fb20cc19000-7fb20cc20000 r--p 000f1000 08:05 12305                      /usr/lib/libstdc++.so.6.0.10
7fb20cc20000-7fb20cc22000 rw-p 000f8000 08:05 12305                      /usr/lib/libstdc++.so.6.0.10
7fb20cc22000-7fb20cc35000 rw-p 7fb20cc22000 00:00 0 
7fb20cc35000-7fb20cc55000 r-xp 00000000 08:05 67391                      /lib/ld-2.9.so
7fb20ce2e000-7fb20ce31000 rw-p 7fb20ce2e000 00:00 0 
7fb20ce4f000-7fb20ce54000 rw-p 7fb20ce4f000 00:00 0 
7fb20ce54000-7fb20ce55000 r--p 0001f000 08:05 67391                      /lib/ld-2.9.so
7fb20ce55000-7fb20ce56000 rw-p 00020000 08:05 67391                      /lib/ld-2.9.so
7fff14e40000-7fff14e55000 rw-p 7ffffffea000 00:00 0                 Aborted

or double frees.

** Affects: pretzel (Ubuntu)
     Importance: Undecided
         Status: New

-- 
pretzel generated noweb filter segfaults
https://bugs.launchpad.net/bugs/405207
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list