Bug 509278 - double free or memory corruption in aslink
double free or memory corruption in aslink
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sdcc (Show other bugs)
11
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Conrad Meyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-01 21:49 EDT by Jacek Radzikowski
Modified: 2009-07-23 15:01 EDT (History)
3 users (show)

See Also:
Fixed In Version: 2.9.0-3.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-23 15:01:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jacek Radzikowski 2009-07-01 21:49:03 EDT
Description of problem:
aslink crashes when linking program for 8051 architecture

Version-Release number of selected component (if applicable):
sdcc-2.9.0-1.fc11

How reproducible:
Create the test file and run compile/link command


Steps to Reproduce:
1. Create test program:
void main()
{
}


2. Run the following command:
sdcc -mmcs51  test.c

  
Actual results:
*** glibc detected *** /usr/libexec/sdcc/aslink: double free or corruption (fasttop): 0x08f72148 ***
======= Backtrace: =========
/lib/libc.so.6[0xb53231]
/usr/libexec/sdcc/aslink[0x80540e4]
/usr/libexec/sdcc/aslink[0x804a68d]
/lib/libc.so.6(__libc_start_main+0xe6)[0xaf9a66]
/usr/libexec/sdcc/aslink[0x8048cf1]
======= Memory map: ========
00abb000-00adb000 r-xp 00000000 fd:00 4235286    /lib/ld-2.10.1.so
00adb000-00adc000 r--p 0001f000 fd:00 4235286    /lib/ld-2.10.1.so
00adc000-00add000 rw-p 00020000 fd:00 4235286    /lib/ld-2.10.1.so
00ae3000-00c4e000 r-xp 00000000 fd:00 4235300    /lib/libc-2.10.1.so
00c4e000-00c4f000 ---p 0016b000 fd:00 4235300    /lib/libc-2.10.1.so
00c4f000-00c51000 r--p 0016b000 fd:00 4235300    /lib/libc-2.10.1.so
00c51000-00c52000 rw-p 0016d000 fd:00 4235300    /lib/libc-2.10.1.so
00c52000-00c55000 rw-p 00c52000 00:00 0
00cc4000-00cc5000 r-xp 00cc4000 00:00 0          [vdso]
05252000-0527c000 r-xp 00000000 fd:00 4235353    /lib/libgcc_s-4.4.0-20090506.so.1
0527c000-0527d000 rw-p 00029000 fd:00 4235353    /lib/libgcc_s-4.4.0-20090506.so.1
08047000-0805b000 r-xp 00000000 fd:00 4063296    /usr/libexec/sdcc/aslink
0805b000-0805f000 rw-p 00013000 fd:00 4063296    /usr/libexec/sdcc/aslink
0805f000-082e3000 rw-p 0805f000 00:00 0
08f70000-08f91000 rw-p 08f70000 00:00 0          [heap]
b8038000-b803a000 rw-p b8038000 00:00 0
b805a000-b805b000 rw-p b805a000 00:00 0
b805e000-b805f000 rw-p b805e000 00:00 0
bfe03000-bfe18000 rw-p bffeb000 00:00 0          [stack]



Expected results:
Successful execution of linker.


Additional info:
The resulting hex file seems to be created properly
Comment 1 Conrad Meyer 2009-07-05 16:09:12 EDT
I'm sure upstream would appreciate this report :). Have you submitted it there?
Comment 2 Jacek Radzikowski 2009-07-06 12:13:29 EDT
Submitted.
Comment 3 Conrad Meyer 2009-07-06 15:21:55 EDT
Thanks!
Comment 4 Borut Ražem 2009-07-18 05:46:19 EDT
Fixed in sdcc svn repository, revision #5476.

Borut
Comment 5 Conrad Meyer 2009-07-18 05:51:14 EDT
Borut,

Do you think we should grab the changeset of #5476 and apply that to our package?

Thanks
Comment 6 Borut Ražem 2009-07-18 07:18:31 EDT
Conrad,

yes, I think so since the bug is quite annoying. There is also a workaround to set MALLOC_CHECK_=0, but it is only a workaround...

The change is trivial, just remove line
           free (obj_name);
in file lkar.c, function buildlibraryindex_ar() at line 457.

Thanks,
Borut
Comment 7 Fedora Update System 2009-07-20 21:15:45 EDT
sdcc-2.9.0-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/sdcc-2.9.0-3.fc11
Comment 8 Conrad Meyer 2009-07-20 21:21:34 EDT
Want to try that, Jacek?
Comment 9 Jacek Radzikowski 2009-07-21 00:01:56 EDT
Can I update packages with yum or only with rpm?
Comment 10 Jacek Radzikowski 2009-07-21 00:17:19 EDT
ok, installed from downloaded packages. Aslink works properly, generates working hex file. Any other tests I can run?
Comment 11 Conrad Meyer 2009-07-21 00:19:22 EDT
I don't know of any others; but that indicates to me that this particular bug is fixed. I'll submit the update for F-11 stable. Thanks!
Comment 12 Jacek Radzikowski 2009-07-21 00:24:09 EDT
Thanks!(In reply to comment #11)
> I don't know of any others; but that indicates to me that this particular bug
> is fixed. I'll submit the update for F-11 stable. Thanks!  

Thanks!
Comment 13 Fedora Update System 2009-07-23 15:01:22 EDT
sdcc-2.9.0-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.