On Sun, 2019-02-17 at 20:51 -0600, Peng Yu wrote:
> Hi,
> 
> I have the follow flex code using Boehm garbage collector.
> http://www.hboehm.info/gc/gcinterface.html
> 
> The program is compiled with the following commands.
> 
> $ flex -o main.l.c main.l
> $ clang -I. -DGC_DEBUG -Wall -pedantic -g -c -o main.l.o main.l.c #
> rapidstring.h is in .
> $ clang main.l.o -lgc -lfl -o main.l.exe
> $ dsymutil main.l.exe
> 
> rapidstring.h can be downloaded here.
> 
> https://raw.githubusercontent.com/boyerjohn/rapidstring/master/include/rapidstring.h
> 
> The following commands show that without using valgrind, the program
> runs OK. But if valgrind is used, the program will cause a
> segmentation fault.
> 
> Is it because valgrind does not work with a garbage collector?
It would not be very amasing that memcheck (that replaces malloc) would
conflict with something like Boehm gc, that for sure does strange
things with malloc replacement itself.

You might first try with --tool=none to see if the basis of valgrind+boehm gc 
works.

Philippe



_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to