Bug#558980: access to hppa machine to work on Bug#558980
On Mon, Dec 14, 2009 at 07:46:52AM -0500, Stephen Leake wrote: ... Ludovic also suggested removing '-fstack-check' from the list of compiler options. I did that, rebuilt the static and dynamic libraries, and the bug went away; the test code works with both static and dynamic libraries. Dave, Carlos, Would this imply something might be broken in the stack unwinding? Possibly. An off by one error was recently fixed on GCC head. This affects Ada but not Java. Java had code to adjust the program counter by one instruction when catching signals. The change could be backported to 4.4, but I don't intend to do it because the behavior isn't a regression and it changes the behavior of libgcc_s.so. We need a version bump for libgcc_s.so in 4.5. We don't have any backend support for '-fstack-check'. Eric Botcazou has recently done some updates which I think fix some issues with generic stack checking. See for example, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20548 So, it might help to try a recent 4.5.0 snapshot. The fact that the stack grows upwards on hppa is a bit unusual and might be a source of problems. It is possible that we could add backend support for stack checking using the probe instruction, etc, but I don't have time to look into it until we finish moving. There's still a few remaining issues for 4.5.0 to be addressed. Or is this more likely to be something specific to Gnu ADA? Dave -- J. David Anglin dave.ang...@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#558980: access to hppa machine to work on Bug#558980
Carlos O'Donell wrote: On Sun, Dec 13, 2009 at 10:03 AM, Stephen Leake wrote: Frans Pop gave me access to his machine. I have some more information on the bug. If I compile from full GNADE source (not using the GNADE dynamic or static libraries), the code works. What does from full GNADE source mean? I think that means recompile the application program and the sources of the library into a single, statically-linked program as opposed to compile the library sources, create a (static|shared) library and link into the executable. [...] With the static library, I get a stack overflow (caught and reported by the Ada runtime), during elaboration of a compiler-provided container library. Could you please define during elaboration? It seems only Ada programmers know about elaboration :) In a nutshell, elaboration is all that happens between the transfer of control from the dynamic loader to the executable and the start of execution of the main subprogram (main() in C and C++, anything in Ada). Elaboration consists in allocating and initialalizing nonstatic global variables, i.e. those declared outside of any subprogram but whose value is unknown at compile time. This might involve calling user-defined functions that return the initial value of a variable. Subprograms and Ada packages, too, are elaborated; their elaboration consists only in making sure all the global variables and other subprograms they depend on are already elaborated. Example: -*- mode: c -*- #include stdlib.h int i = foo (); int main () { puts (this is called after elaboration\n); return i; } int foo () { puts (this is called during elaboration\n); return rand (); } The example illustrates the importance of controlling elaboration order. In this case, i must be elaborated before main() is called but after puts() and rand () are elaborated. Ada offers precise control of elaboration order and the compiler can report the elaboration order it has chosen for a given executable program. -- Ludovic Brenta. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#558980: access to hppa machine to work on Bug#558980
Carlos O'Donell car...@systemhalted.org writes: On Sun, Dec 13, 2009 at 10:03 AM, Stephen Leake stephen_le...@stephe-leake.org wrote: Frans Pop gave me access to his machine. I have some more information on the bug. If I compile from full GNADE source (not using the GNADE dynamic or static libraries), the code works. What does from full GNADE source mean? Ludovic answered this nicely. With the dynamic library, I get a SIGSEGV, somewhere in the program startup, before any user code. Export LD_DEBUG=all, run the program, this will tell you what the dynamic loader is doing every step of the way. This shows lots of symbols being resolved, nothing helpful. If you see transferring control: then the dynamic loader has just handed off control the real program, and any fault after that is possibly related to the real program. That is there, although there are more symbols looked up after it. With the static library, I get a stack overflow (caught and reported by the Ada runtime), during elaboration of a compiler-provided container library. Could you please define during elaboration? Ludovic answered this nicely. Ludovic also suggested removing '-fstack-check' from the list of compiler options. I did that, rebuilt the static and dynamic libraries, and the bug went away; the test code works with both static and dynamic libraries. So I will leave hppa in the arch list, but remove the stack check option. -- -- Stephe -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#558980: access to hppa machine to work on Bug#558980
On Mon, Dec 14, 2009 at 7:46 AM, Stephen Leake stephen_le...@stephe-leake.org wrote: If you see transferring control: then the dynamic loader has just handed off control the real program, and any fault after that is possibly related to the real program. That is there, although there are more symbols looked up after it. This is good news, it means the dynamic loader handed control to the program. So I will leave hppa in the arch list, but remove the stack check option. Would it be possible for you to keep open a low severity bug indicating that this needs to be fixed? Remember to tag the bug hppa, so that I can track it on our ports to-do list e.g. http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=debian-h...@lists.debian.org;which=tagdata=hppaarchive=no We are working through the tagged bugs to try make progress. Cheers, Carlos. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#558980: access to hppa machine to work on Bug#558980
On Mon, Dec 14, 2009 at 07:46:52AM -0500, Stephen Leake wrote: ... Ludovic also suggested removing '-fstack-check' from the list of compiler options. I did that, rebuilt the static and dynamic libraries, and the bug went away; the test code works with both static and dynamic libraries. Dave, Carlos, Would this imply something might be broken in the stack unwinding? Or is this more likely to be something specific to Gnu ADA? thanks, grant -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org