Your message dated Mon, 05 Oct 2009 07:17:26 +0000
with message-id <e1muhp0-0003e3...@ries.debian.org>
and subject line Bug#542158: fixed in gnat-4.4 4.4.1-6
has caused the Debian Bug report #542158,
regarding gnat-4.4: Unchecked_Deallocation causes double-free errors
(amd64-specific)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
542158: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542158
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: gnat-4.4
Version: 4.4.1-1
Severity: normal
There is a problem with Unchecked_Deallocation on amd64 when freeing
memory of an extended type object which defines an Unbounded_String
field (and possibly other fields). The following code reproduces the
problem:
---
with Ada.Strings.Unbounded;
use Ada.Strings.Unbounded;
package Double_Free is
type Test_Base is tagged null record;
type Test_Class_Access is access all Test_Base'Class;
type Test_Extension is new Test_Base with record
Last_Name : Unbounded_String := Null_Unbounded_String;
end record;
end Double_Free;
---
with Ada.Unchecked_Deallocation;
with Double_Free; use Double_Free;
procedure Main is
procedure Free is new Ada.Unchecked_Deallocation
(Object => Test_Base'Class,
Name => Test_Class_Access);
Handle : Test_Class_Access := new Test_Extension;
begin
Free (Handle);
end Main;
---
Executing the 'main' binary produced by gnat-4.4 leads to *** glibc
detected *** obj/main: double free or corruption errors. Valgrind trace:
valgrind --leak-check=full --show-reachable=yes --leak-resolution=high
../obj/main
==5772== Memcheck, a memory error detector.
==5772== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==5772== Using LibVEX rev 1884, a library for dynamic binary translation.
==5772== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==5772== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation
framework.
==5772== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==5772== For more details, rerun with: -v
==5772==
==5772== Invalid free() / delete / delete[]
==5772== at 0x4C2261F: free (vg_replace_malloc.c:323)
==5772== by 0x50A8D84: __gnat_free (in /usr/lib/libgnat-4.4.so.1)
==5772== by 0x403FC4: _ada_main (in /home/reet/double-free/obj/main)
==5772== by 0x40327B: main (in /home/reet/double-free/obj/main)
==5772== Address 0x5b3b040 is 16 bytes inside a block of size 136 alloc'd
==5772== at 0x4C2391E: malloc (vg_replace_malloc.c:207)
==5772== by 0x50A8DC7: __gnat_malloc (in /usr/lib/libgnat-4.4.so.1)
==5772== by 0x403EF0: _ada_main (in /home/reet/double-free/obj/main)
==5772== by 0x40327B: main (in /home/reet/double-free/obj/main)
==5772==
==5772== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 1)
==5772== malloc/free: in use at exit: 136 bytes in 1 blocks.
==5772== malloc/free: 1 allocs, 1 frees, 136 bytes allocated.
==5772== For counts of detected errors, rerun with: -v
==5772== searching for pointers to 1 not-freed blocks.
==5772== checked 203,328 bytes.
==5772==
==5772==
==5772== 136 bytes in 1 blocks are definitely lost in loss record 1 of 1
==5772== at 0x4C2391E: malloc (vg_replace_malloc.c:207)
==5772== by 0x50A8DC7: __gnat_malloc (in /usr/lib/libgnat-4.4.so.1)
==5772== by 0x403EF0: _ada_main (in /home/reet/double-free/obj/main)
==5772== by 0x40327B: main (in /home/reet/double-free/obj/main)
==5772==
==5772== LEAK SUMMARY:
==5772== definitely lost: 136 bytes in 1 blocks.
==5772== possibly lost: 0 bytes in 0 blocks.
==5772== still reachable: 0 bytes in 0 blocks.
==5772== suppressed: 0 bytes in 0 blocks.
Freeing memory of a base type object (Test_Base) works without problems.
When the unbounded string field (Name) is removed or replaced (e.g. by
an Integer), freeing also works for the type extension.
The code has been tested with the following compiler / arch
combinations:
i386/gnat-4.3 : works
i386/gnat-4.4 : works
amd64/gnat-4.3 : works
amd64/gnat-4.4 : FAILS
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnat-4.4 depends on:
ii gcc-4.4 4.4.1-1 The GNU C compiler
ii gnat-4.4-base 4.4.1-1 The GNU Compiler Collection (gnat
ii libc6 2.9-24 GNU C Library: Shared libraries
ii libc6-dev 2.9-24 GNU C Library: Development Librari
ii libcloog-ppl0 0.15-2 the Chunky Loop Generator (runtime
ii libgcc1 1:4.4.1-1 GCC support library
ii libgmp3c2 2:4.3.1+dfsg-3 Multiprecision arithmetic library
ii libgmpxx4ldbl 2:4.3.1+dfsg-3 Multiprecision arithmetic library
ii libgnat-4.4 4.4.1-1 Runtime library for GNU Ada applic
ii libgnatprj4.4 4.4.1-1 GNU Ada Project Manager
ii libgnatvsn4.4 4.4.1-1 GNU Ada compiler version library
ii libmpfr1ldbl 2.4.1-2 multiple precision floating-point
ii libppl-c2 0.10.2-2 Parma Polyhedra Library (C interfa
ii libppl7 0.10.2-2 Parma Polyhedra Library (runtime l
gnat-4.4 recommends no packages.
Versions of packages gnat-4.4 suggests:
pn ada-reference-manual <none> (no description available)
pn gnat-4.4-doc <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: gnat-4.4
Source-Version: 4.4.1-6
We believe that the bug you reported is fixed in the latest version of
gnat-4.4, which is due to be installed in the Debian FTP archive:
gnat-4.4-base_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/gnat-4.4-base_4.4.1-6_amd64.deb
gnat-4.4_4.4.1-6.diff.gz
to pool/main/g/gnat-4.4/gnat-4.4_4.4.1-6.diff.gz
gnat-4.4_4.4.1-6.dsc
to pool/main/g/gnat-4.4/gnat-4.4_4.4.1-6.dsc
gnat-4.4_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/gnat-4.4_4.4.1-6_amd64.deb
libgnat-4.4-dbg_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnat-4.4-dbg_4.4.1-6_amd64.deb
libgnat-4.4_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnat-4.4_4.4.1-6_amd64.deb
libgnatprj4.4-dbg_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnatprj4.4-dbg_4.4.1-6_amd64.deb
libgnatprj4.4-dev_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnatprj4.4-dev_4.4.1-6_amd64.deb
libgnatprj4.4_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnatprj4.4_4.4.1-6_amd64.deb
libgnatvsn4.4-dbg_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnatvsn4.4-dbg_4.4.1-6_amd64.deb
libgnatvsn4.4-dev_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnatvsn4.4-dev_4.4.1-6_amd64.deb
libgnatvsn4.4_4.4.1-6_amd64.deb
to pool/main/g/gnat-4.4/libgnatvsn4.4_4.4.1-6_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 542...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ludovic Brenta <lbre...@debian.org> (supplier of updated gnat-4.4 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sat, 3 Oct 2009 23:16:31 +0200
Source: gnat-4.4
Binary: gnat-4.4-base gnat-4.4 libgnat-4.4 libgnat-4.4-dbg libgnatvsn4.4-dev
libgnatvsn4.4 libgnatvsn4.4-dbg libgnatprj4.4-dev libgnatprj4.4
libgnatprj4.4-dbg
Architecture: source amd64
Version: 4.4.1-6
Distribution: unstable
Urgency: low
Maintainer: Debian GCC Maintainers <debian-...@lists.debian.org>
Changed-By: Ludovic Brenta <lbre...@debian.org>
Description:
gnat-4.4 - The GNU Ada compiler
gnat-4.4-base - The GNU Compiler Collection (gnat base package)
libgnat-4.4 - Runtime library for GNU Ada applications
libgnat-4.4-dbg - Runtime library for GNU Ada applications
libgnatprj4.4 - GNU Ada Project Manager
libgnatprj4.4-dbg - GNU Ada Project Manager
libgnatprj4.4-dev - GNU Ada Project Manager development files
libgnatvsn4.4 - GNU Ada compiler version library
libgnatvsn4.4-dbg - GNU Ada compiler version library
libgnatvsn4.4-dev - GNU Ada compiler version library - development files
Closes: 542158
Changes:
gnat-4.4 (4.4.1-6) unstable; urgency=low
.
Merge from gcc-4.4 (4.4.1-5) unstable; urgency=medium
.
* Update to SVN 20091003 from the gcc-4_4-branch (r152174).
- Fixes PR target/22093, PR c/39779, PR libffi/40242, PR target/40473,
PR debug/40521, PR c/41049, PR debug/41065,
PR ada/41100 (Closes: #542158),
PR tree-optimization/41101, PR libgfortran/41328, PR libffi/41443,
PR fortran/41515.
* Updates for snapshot builds:
- Fix build dependency on automake for snapshot builds.
- Update patches pr40134-snap and libjava-nobiarch-check-snap.
* Fix lintian errors in libstdc++ packages and lintian warnings in the
source package.
* Add debian/README.source.
* Don't apply PR libstdc++/39491 for the trunk anymore.
* Install java home symlinks for snapshot builds in /usr/lib/jvm,
including javac. Depend on ecj. Addresses #536102.
* Fix build failure on armel with -mfloat-abi=softfp.
* Don't pessimize the code for newer armv6 and armv7 processors.
* libjava: Use atomic builtins For Linux ARM/EABI, backported from the
trunk.
* Proposed patch to fix wrong-code on powerpc (Alan Modra). LP: #432222.
* Link against -ldl instead of -lcloog -lppl. Exit with an error when using
the Graphite loop transformation infrastructure without having the
libcloog-ppl0 package installed (patch taken from Fedora). Packages
using these optimizations should build-depend on libcloog-ppl0.
gcc-4.4: Suggest the cloog runtime libraries.
* Install a hook _Unwind_DebugHook, called during unwinding. Intended as
a hook for a debugger to intercept exceptions. CFA is the CFA of the
target frame. HANDLER is the PC to which control will be transferred
(patch taken from Fedora).
Checksums-Sha1:
14a314f64229a7ad20ccd9b7d1a2ca1590779d4d 2414 gnat-4.4_4.4.1-6.dsc
bc766f1431c0750c919664edc096e296edc0cbfb 3823380 gnat-4.4_4.4.1-6.diff.gz
0721b3bef5d567a26f827a37a4f84480129420b1 127750 gnat-4.4-base_4.4.1-6_amd64.deb
985294ca2d6fab3e1d8341b108fb2701cdb57964 1148568 libgnat-4.4_4.4.1-6_amd64.deb
261e6e8ea88f9eaef4c857edd5cafcb9ed6ca52a 1716486
libgnatvsn4.4-dev_4.4.1-6_amd64.deb
960312ab13f94a65b0e0af65fe5b2126e825a852 335806 libgnatvsn4.4_4.4.1-6_amd64.deb
ee185dcb240bd1b2b57793681051be95a40aef07 2659558
libgnatprj4.4-dev_4.4.1-6_amd64.deb
6cc729bb048a7e0b186ca38f39ac2b27b3846a29 580178 libgnatprj4.4_4.4.1-6_amd64.deb
e6aea7a7567983121a3574c98d7ebaca57cf3605 882792
libgnatprj4.4-dbg_4.4.1-6_amd64.deb
c9f1307260b1bac6e3c1d698d2536b63a565c798 1952934
libgnat-4.4-dbg_4.4.1-6_amd64.deb
e885cdb001acf7723147d0330c9adf94c527de30 458874
libgnatvsn4.4-dbg_4.4.1-6_amd64.deb
ff81f7cb4821a8174f41dbf6007f3580789547f5 14432198 gnat-4.4_4.4.1-6_amd64.deb
Checksums-Sha256:
39fd57a986dc156c007ca9db820c7c0b402f30d8431bed1e5f489c3b0d9a73d9 2414
gnat-4.4_4.4.1-6.dsc
077bc94394c0e2bb91e97cba3ee36ae793b4d6edd94ce4eb335d7c4d57d25467 3823380
gnat-4.4_4.4.1-6.diff.gz
db68284a081fc8f67fc66c2161423137403c37578fa27ded6ec7f9e909bd9d0b 127750
gnat-4.4-base_4.4.1-6_amd64.deb
58e7c44c67edfc071823960c955e94c704005025e66d2c792e640efaaaa4e0d9 1148568
libgnat-4.4_4.4.1-6_amd64.deb
248254e8890dc854d0bcd31be1d3bfbcb2e1eef607d2a14c54b270ba645820b6 1716486
libgnatvsn4.4-dev_4.4.1-6_amd64.deb
323f60c44bfc2d695124ac6a438a19220cd8fd4e5efd954a37e5ba95e207be92 335806
libgnatvsn4.4_4.4.1-6_amd64.deb
b612f33507e295c0f21471bb1cf616c05583c278c5a39a1cffa22102a7aaffc7 2659558
libgnatprj4.4-dev_4.4.1-6_amd64.deb
37413af25de887d2959b128c032ab80e6f58d1da40f0cc472c1444f075898f01 580178
libgnatprj4.4_4.4.1-6_amd64.deb
0029bd4f90a29e8786eb9e3f085ffe289964f5546d6dc6ddbc513a253cad037a 882792
libgnatprj4.4-dbg_4.4.1-6_amd64.deb
a376b228f17c660fe5eb74353b72e58e3c39a31bf7ecb949b195688d8d245e26 1952934
libgnat-4.4-dbg_4.4.1-6_amd64.deb
34b20afd9c910918bb435fbdf4c01be8877838d35ca1f75a2592c516b0385539 458874
libgnatvsn4.4-dbg_4.4.1-6_amd64.deb
d0935a24663cbd3b2d78cdb72284a073698fec998856ba081f5e4ca442fded7c 14432198
gnat-4.4_4.4.1-6_amd64.deb
Files:
83df60ed2dd1636a471bdeb2d336cf0b 2414 devel optional gnat-4.4_4.4.1-6.dsc
f49c530521fb4c9f81926fe3b7e30c92 3823380 devel optional
gnat-4.4_4.4.1-6.diff.gz
5f2b89dfd1ba269d875629b2b8a28acc 127750 libs optional
gnat-4.4-base_4.4.1-6_amd64.deb
f0cf3324635301aa3b25f21129360921 1148568 libs optional
libgnat-4.4_4.4.1-6_amd64.deb
41423c5d5dbac746524032656c321118 1716486 libdevel optional
libgnatvsn4.4-dev_4.4.1-6_amd64.deb
12156471308c48d534c11bdb4f3888a3 335806 libs optional
libgnatvsn4.4_4.4.1-6_amd64.deb
4b00364b406f951067f2b57df6a106aa 2659558 libdevel optional
libgnatprj4.4-dev_4.4.1-6_amd64.deb
984c57d435fa026d3791fa1cbc166258 580178 libs optional
libgnatprj4.4_4.4.1-6_amd64.deb
8b5dfc67b60f5150d7083155821e134f 882792 debug extra
libgnatprj4.4-dbg_4.4.1-6_amd64.deb
501a6934c18ce68b4bf429c122373268 1952934 debug extra
libgnat-4.4-dbg_4.4.1-6_amd64.deb
4598acc5ee675d245c769ab7bbb783dd 458874 debug extra
libgnatvsn4.4-dbg_4.4.1-6_amd64.deb
759818835b2f0686a5903d65269f02ed 14432198 devel optional
gnat-4.4_4.4.1-6_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFKyZVYx9kwJZ3/qtQRAqwGAJ9J7Y+zrQdebUFyHpymGTqcynzGmQCfcyJ6
WQ6ut3iNpVa7/7x6ujephGQ=
=gW/M
-----END PGP SIGNATURE-----
--- End Message ---