Re: [Tinycc-devel] Memory corruption bug in libtcc

2012-01-22 Thread grischka
Andreas Eriksson wrote: Hi. I encountered a memory corruption bug in libtcc. It seems to put random data into random data structures of the program that are unrelated to libtcc. I've been able to reproduce the bug using a simple test-case, which is attached. The output of what I get when I run t

Re: [Tinycc-devel] Testing Console Application with CreateProcess

2012-01-22 Thread grischka
gr...@nethere.com wrote: I'm writing a small app to do automated testing of a console application. It needs to repeatedly run the app with various options and handle when the app being tested crashes. I started with system(), moved on to spawn() and have since been trying CreateProcess(). It star

Re: [Tinycc-devel] Testing Console Application with CreateProcess

2012-01-22 Thread Thomas Preud'homme
Le dimanche 22 janvier 2012 14:27:09, grischka a écrit : > gr...@nethere.com wrote: > > I'm writing a small app to do automated testing of a console application. > > It needs to repeatedly run the app with various options and handle when > > the app being tested crashes. I started with system(), mo

Re: [Tinycc-devel] Memory corruption bug in libtcc

2012-01-22 Thread Thomas Preud'homme
Le dimanche 22 janvier 2012 14:15:31, grischka a écrit : > Andreas Eriksson wrote: > > Hi. > > > > I encountered a memory corruption bug in libtcc. It seems to put > > random data into random data structures of the program that are > > unrelated to libtcc. I've been able to reproduce the bug using

Re: [Tinycc-devel] Memory corruption bug in libtcc

2012-01-22 Thread grischka
Thomas Preud'homme wrote: Similar bug happens for i386 for example with double bar(double a, double b, double c, double d); double foo (double *p) { return bar(p[1], p[2], p[3], p[4]); } which produces 49: 8b 5d fcmov0xfffc(%ebp),%ebx

Re: [Tinycc-devel] Memory corruption bug in libtcc

2012-01-22 Thread Daniel Glöckner
On Mon, Jan 23, 2012 at 12:14:58AM +0100, grischka wrote: > Thomas Preud'homme wrote: > >>Similar bug happens for i386 for example with > >> > >> double bar(double a, double b, double c, double d); > >> double foo (double *p) > >> { > >> return bar(p[1], p[2], p[3], p[4]); > >>