Opened 19 years ago

Closed 19 years ago

Last modified 19 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 by Yuri Dario, 19 years ago

Milestone: libc-0.6.1

comment:2 by bird, 19 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #27.

comment:3 by bird, 19 years ago

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