Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#35 closed defect (duplicate)

ld crashes when map files are enabled

Reported by: Yuri Dario Owned by: bird
Priority: normal Milestone:
Component: emx Version: 0.6
Severity: normal Keywords:
Cc:

Description

ld crashes when map file name differs from module name, because of wrong memory allocation.

Index: src/ld/ld.c
===================================================================
--- src/ld/ld.c	(revision 2508)
+++ src/ld/ld.c	(working copy)
@@ -3984,7 +3984,7 @@
 	{
 	  if (map_filename == NULL)
 	    {
-	      freeav[j++] = map_filename = ALLOCA (strlen (output_filename) + 5);
+	      freeav[j++] = map_filename = ALLOCA (strlen (exe_filename) + 5);
               strcpy (map_filename, exe_filename);
 	      _remext (map_filename);
 	      strcat (map_filename, ".map");

Change History (3)

comment:1 Changed 18 years ago by Yuri Dario

Milestone: libc-0.6.1

comment:2 Changed 18 years ago by bird

Resolution: duplicate
Status: newclosed

Duplicate of #27.

comment:3 Changed 18 years ago by bird

Milestone: libc-0.6.1
Version: 0.6
Note: See TracTickets for help on using tickets.