|
From: | Cristian Baboi |
Subject: | code example |
Date: | Tue, 25 Sep 2007 13:40:41 +0300 |
User-agent: | Opera Mail/9.23 (Win32) |
On Tue, 25 Sep 2007 02:04:26 +0300, Bruno Haible <address@hidden> wrote:
Thank you for reporting this. Indeed, a call to va_copy is missing here, since a va_list can only be traversed once, not twice. I have applied the appended patch. But I don't understand the need for va_copy in the second part of your patch. Why should that be needed?
The following code give segfault on RHEL4 AS x86_64 if compiled with -m32 flag. #include <stdio.h> typedef struct { float a; float b; } pt[1]; pt* f(pt *p){ return p; }; pt* g(pt p){ return f(&p); }; main(){ pt x,*y; x[1].a=1.1; x[1].b=1.2; y=g(x); }; ------------------------------------------------------------- This mail was scanned by BitDefender For more informations please visit http://www.bitdefender.com ------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |