Bug#230809: gnat: what's the status of #230809?
> Hello. I've read about new uploads solving this problem. Has there > been any progress yet? Thanks, The problem in the static library was solved in gnat 3.15p-7, but the problem in the shared library is still there, as well as in AdaCore's binary. If you use 3.15p-12, you can avoid the problem by linking statically. -- Ludovic Brenta.
Bug#297980: gnat-gps: starting compilation terminates X session
Jan C. Nordholz wrote: > - Upon the request to begin compilation, gnat-gps claims a legacy > legacy PTY (it should really use the new mechanism and open /dev/ptmx > instead) and forks off... I don't think that using the legacy mechanism for allocating a pty is the culprit, but if I have time I will patch gnat-gps to just use /dev/ptmx. [...] > ... and finally closes the PTY master device. And now look > closer... > > close(5) = 0 > close(5) = -1 EBADF (Bad file descriptor) > ioctl(5, TIOCGPGRP, [1]) = -1 EBADF (Bad file descriptor) > kill(-1, SIGINT) = 0 > > Closing it twice isn't problematic, but ioctl()ing on the FD _after_ > closing it, and using the return value unchecked as argument for > kill() is, well, suicidal. :-) And in the case of -1 fatal, as > that sends SIGINT to all processes that gnat-gps is capable to > signals to... and that includes either the Xserver itself (if you've > started it via startx et.al.) or your favourite window manager / login > terminal / whatever keeps your session running. > > I've not looked into the gnat-gps source code until now, but if > you want, I could lend a hand there, too. Thank you so much for your detailed investigation. I ran gnat-gps under strace too, but couldn't spot the problem with ioctl. I will investigate in the gnat-gps sources and tell you where I think the problem is. If you can lend a hand as you say, your help is most welcome. -- Ludovic Brenta.
Bug#297980: xserver-xfree86: X server crashes when compiling a program from gnat-gps
As noted previously, the X server does not crash, it exists voluntarily. The cause for this is now known to be that gnat-gps calls kill (-1, SIGINT) which kills the user's session. See #297980 for more details. -- Ludovic Brenta.
Bug#297980: gnat-gps: kill(-1, SIGINT), additional info
tags 297980 -help tags 297980 +pending thanks Jan Nordholz writes: > Removing the "#ifdef pfa" around the return value check should fix > the problem, although that's likely only mending the symptoms, not > the cause: The code in question has no support whatsoever for the > case that the ioctl()ed FD is already closed, so maybe this should > be detected and handled properly earlier. I tried that and behold, the bug is fixed! I agree that this fixes the symptoms and not the cause. However, that will be the solution in Debian for the time being. The reasons are (a) to keep the patch minimal, and (b) because the sources in CVS have been refactored and reorganised quite heavily. Of course I will submit the patch to the upstream authors. FYI, the offending #ifdef pfa is still there in CVS, although the file moved from gvd/gnat to common/gnat. Also FYI, the upstream sources now use /dev/ptmx if available, and fall back to a function called allocate_pty_the_old_fashioned_way (sic) if this fails :) Thank you for the invaluable help! -- Ludovic Brenta.
Bug#297985: GPS causes XServer to crash bug
Yossi Tamari wrote: > I noticed you reported about the GPS problem. I was wondering if you > know what is the staus of this bug and what is the estimated time it > would be fixed. I would hate to install Windows for Ada > programming... The status of the bug is exactly as described in the report. Nothing has happened since the last update, and I try to work on it on my free time (i.e. after work) but I cannot yet explain or solve the problem. I also cannot estimate the time required to fix it. You don't have to install Windows. As Peter Keller reported, you can use GPS if you install linux 2.6.8-2-386 and ensure that udev is enabled. The problem is specific to linux 2.4, or 2.6 with udev disabled. > If I can help trace the origin of the problem please > let me know - Yes, you can help trace the problem; thank you for the offer. As far as I understand, GPS is somehow causing the X server to shut down cleanly i.e. the X server decides to shut down, like when you do Ctrl+Alt+Backspace. You can try to attach gdb to the X server and see why it decides to shut down; see my earlier comments in the bug report, and bug #297895, for instructions. Also, I suspect that the X server is trying to access a device file which does not exist, of has wrong permissions, when udev is disabled. This causes the X server to shut down. When udev is enabled, it creates the device file dynamically and everything works. You can help confirm this theory of mine, and determine what that device is and what it's used for. > I do not know to whome I should refer in the Debian team. The Debian team for gnat-gps is one person - me. The best is to send mail to [EMAIL PROTECTED], [EMAIL PROTECTED] so that your contributions are logged in the bug reports. Other people can help, too, by reading the reports and trying things out. For that matter, I am CCing the two bug reports; please feel free to followup there. If you would like to be notified by email whenever someone sends mail to one of the bug reports, go to the package tracking system[1] and subscribe to the package gnat-gps. [1] http://packages.qa.debian.org/g/gnat-gps.html -- Ludovic Brenta.
Bug#312621: gnat: Bug Box when reading a program with UTF-8 encoded enumeration literals
Package: gnat Version: 3.15p-12 Severity: normal Tags: patch (From GCC Bugzilla PR ada/19519, reported by Georg Bauhaus <[EMAIL PROTECTED]>) The following program triggers the bug box when encoded as UTF-8. It runs fine when used with Latin-1 characters. The compiler can test the robustness of your system if you use iconv to encode the source text in EUC-JP and then try to compile with -gnatiw -gnatWe. (I guess that the characters below aren't used very frequently in EUC-JP coded Ada source but still something seems to be looping and consuming lots of memory in this case.) with Ada.Text_IO; use Ada.Text_IO; --with Ada.Wide_Text_IO; use Ada.Wide_Text_IO; -- same effect procedure oeaeue is type People is (Späherin, -- a umlaut -- Pförtner, -- o umlaut -- Schüler, -- u umlaut -- Spieß, -- sharp s Jedermann ); package People_IO is new Enumeration_IO(People); begin for p in People'range loop People_IO.put(p); new_line; end loop; end oeaeue; cd /tmp/ gnatmake -gnatiw -gnatW8 oeaeue.adb gcc-3.4 -c -gnatiw -gnatW8 oeaeue.adb +===GNAT BUG DETECTED==+ | 3.4.2 (Debian 3.4.2-2) (i486-pc-linux-gnu) Constraint_Error s-wchcnv.adb:150 explicit raise| | Error detected at oeaeue.adb:13:4 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Include the entire contents of this bug box in the report. | | Include the exact gcc-3.4 or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==+ >From Robert Dewar <[EMAIL PROTECTED]>: * namet.adb (Copy_One_Character): Set proper wide character encoding for upper half character if we have upper half encoding. === RCS file: /cvs/gcc/gcc/gcc/ada/namet.adb,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- gcc/gcc/ada/namet.adb 2005/02/10 13:50:27 1.10 +++ gcc/gcc/ada/namet.adb 2005/03/18 11:50:30 1.11 @@ -36,6 +36,7 @@ -- which is created manually from namet.ads and namet.adb. with Debug;use Debug; +with Opt; use Opt; with Output; use Output; with Tree_IO; use Tree_IO; with Widechar; use Widechar; @@ -299,7 +300,20 @@ and then Name_Buffer (Old + 1) /= '_' then Old := Old + 1; - Insert_Character (Character'Val (Hex (2))); + + -- If we have upper half encoding, then we have to set an + -- appropriate wide character sequence for this character. + + if Upper_Half_Encoding then + Widechar.Set_Wide (Char_Code (Hex (2)), New_Buf, New_Len); + + -- For other encoding methods, upper half characters can + -- simply use their normal representation. + + else + Insert_Character (Character'Val (Hex (2))); + end if; + -- WW (wide wide character insertion)
Bug#315414: gnat: Rejects matching parameter in generic instantiation as non-matching
tags 315414 confirmed upstream forwarded 315414 http://gcc.gnu.org/PR22165 thanks The following test case isolates the problem more closely. -- ARM 15.5.3(7): "The component subtypes of the formal and actual -- array types shall statically match." generic package P is type T is private; private type T is new Integer; end P; generic type Formal_Array_Type is array (Positive range <>) of T; package P.Q is end P.Q; with P.Q; package Test_315414 is package Instance_Of_P is new P; type Array_Type is array (Positive range <>) of Instance_Of_P.T; package Instance_Of_Q is new P.Q (Formal_Array_Type => Array_Type); end Test_315414; The compiler should accept the program, but says: test_315414.ads:9:49: component subtype of actual does not match that of formal "Formal_Array_Type" test_315414.ads:9:49: instantiation abandoned gnatmake: "test_315414.ads" compilation error Also confirmed on gnat-4.0 and submitted upstream. -- Ludovic Brenta.
Bug#315414: gnat: Rejects matching parameter in generic instantiation as non-matching
forwarded 315414 http://gcc.gnu.org/bugzilla/PR22164 thanks (correcting the URL above) I wrote: >package Instance_Of_Q is new P.Q (Formal_Array_Type => Array_Type); This should be: package Instance_Of_Q is new Instance_Of_P.Q (Formal_Array_Type => Array_Type); -- Ludovic Brenta.
Bug#315416: gnat: Incorrect upper/lower case handling in Ada.Text_IO.Enumeration_IO
Jacob, What options did you pass to GNAT when compiling? I tried with your UTF-8 files and with the following command line: gnatmake -O2 -gnatiw -gnatW8 test_315416.adb The results are a little surprising. 3.15p-12 and 4.0.0-2 both crash because of #312621 (aka PR19519). With 3.15p-13, which fixes #312621, the output contains only lowercase letters. This is the opposite of what you obtained. My locale is fr_FR.UTF-8, but I don't think it matters; what matters is whether or not you passed -gnatiw (enable wide characters) and -gnatW8 (use UTF-8 external encoding). -- Ludovic Brenta. deb http://www.ada-france.org/debian ada main deb-src http://www.ada-france.org/debian ada main