From: Erven R. <erv...@in...> - 2010-01-20 16:05:26
|
Ciao a tutti, the following piece of code does not link when -DBUG is passed (ie when the vararg method is static): "Error: Can't find method: foo" This vaguely reminds me something. Is it just me? Do you also remember a problem like this? [Note: this is cc.c-torture/execute/va-arg-11.c] Thanks, -- Erven. #include <stdarg.h> #include <stdlib.h> #ifdef BUG static #endif int foo (int a, ...) { va_list va; int i, res; va_start (va, a); for (i = 0; i < 4; ++i) (void) va_arg (va, int); res = va_arg (va, int); va_end (va); return res; } int main (void) { if (foo (5, 4, 3, 2, 1, 0)) abort (); exit (0); } |
From: Andrea C. O. <and...@gm...> - 2010-01-20 16:48:09
|
If I recall it correctly it is an error of ilasm, it does not recognize the signature correctly. I think I inserted it in novell bugzilla, but I am not sure. I remember that Dotgnu had the same problem and I have a hack in the mono linker for it. (the difference is that Dotgnu generates an incomplete assembly that I can fix, mono ilasm just breaks) Andrea On Wed, Jan 20, 2010 at 5:05 PM, Erven Rohou <erv...@in...> wrote: > Ciao a tutti, > > the following piece of code does not link when -DBUG is passed (ie when the > vararg method is static): "Error: Can't find method: foo" > This vaguely reminds me something. Is it just me? Do you also remember a problem > like this? > > [Note: this is cc.c-torture/execute/va-arg-11.c] > > Thanks, > > -- > Erven. > > > > #include <stdarg.h> > #include <stdlib.h> > > #ifdef BUG > static > #endif > int foo (int a, ...) > { > va_list va; > int i, res; > > va_start (va, a); > > for (i = 0; i < 4; ++i) > (void) va_arg (va, int); > > res = va_arg (va, int); > va_end (va); > return res; > } > > int > main (void) > { > if (foo (5, 4, 3, 2, 1, 0)) > abort (); > exit (0); > } > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Gcc4cli-devel mailing list > Gcc...@li... > https://lists.sourceforge.net/lists/listinfo/gcc4cli-devel > |
From: Erven R. <erv...@in...> - 2010-01-21 08:32:55
|
Hi Andrea, I checked all the bug you entered in the Novell Bugzilla. Several seem related (pinvoke varargs, or vararg fun called without parameters), but I could not find this one. Do you mind taking a look? If it is not entered, I'll submit it. But how can you tell it is ilasm? When I disassemble the .o (cil32-objdump or parse.NET), the only difference I can see it the flag of method foo: private or public. -- Erven. Andrea Carlo Ornstein a écrit : > If I recall it correctly it is an error of ilasm, it does not > recognize the signature correctly. > I think I inserted it in novell bugzilla, but I am not sure. > > I remember that Dotgnu had the same problem > and I have a hack in the mono linker for it. > (the difference is that Dotgnu generates an incomplete assembly that I > can fix, mono ilasm just breaks) > > Andrea > > > On Wed, Jan 20, 2010 at 5:05 PM, Erven Rohou <erv...@in...> wrote: >> Ciao a tutti, >> >> the following piece of code does not link when -DBUG is passed (ie when the >> vararg method is static): "Error: Can't find method: foo" >> This vaguely reminds me something. Is it just me? Do you also remember a problem >> like this? >> >> [Note: this is cc.c-torture/execute/va-arg-11.c] >> >> Thanks, >> >> -- >> Erven. >> >> >> >> #include <stdarg.h> >> #include <stdlib.h> >> >> #ifdef BUG >> static >> #endif >> int foo (int a, ...) >> { >> va_list va; >> int i, res; >> >> va_start (va, a); >> >> for (i = 0; i < 4; ++i) >> (void) va_arg (va, int); >> >> res = va_arg (va, int); >> va_end (va); >> return res; >> } >> >> int >> main (void) >> { >> if (foo (5, 4, 3, 2, 1, 0)) >> abort (); >> exit (0); >> } >> >> |
From: Erven R. <erv...@in...> - 2010-01-27 08:31:22
|
For the record: I think Andrea convinced himself that it could be a problem in our linker. -- Erven. Andrea Carlo Ornstein a écrit : > If I recall it correctly it is an error of ilasm, it does not > recognize the signature correctly. > I think I inserted it in novell bugzilla, but I am not sure. > > I remember that Dotgnu had the same problem > and I have a hack in the mono linker for it. > (the difference is that Dotgnu generates an incomplete assembly that I > can fix, mono ilasm just breaks) > > Andrea > > > On Wed, Jan 20, 2010 at 5:05 PM, Erven Rohou <erv...@in...> wrote: >> Ciao a tutti, >> >> the following piece of code does not link when -DBUG is passed (ie when the >> vararg method is static): "Error: Can't find method: foo" >> This vaguely reminds me something. Is it just me? Do you also remember a problem >> like this? >> >> [Note: this is cc.c-torture/execute/va-arg-11.c] >> >> Thanks, >> >> -- >> Erven. >> >> >> >> #include <stdarg.h> >> #include <stdlib.h> >> >> #ifdef BUG >> static >> #endif >> int foo (int a, ...) >> { >> va_list va; >> int i, res; >> >> va_start (va, a); >> >> for (i = 0; i < 4; ++i) >> (void) va_arg (va, int); >> >> res = va_arg (va, int); >> va_end (va); >> return res; >> } >> >> int >> main (void) >> { >> if (foo (5, 4, 3, 2, 1, 0)) >> abort (); >> exit (0); >> } |