Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#35 closed defect (duplicate)

ld crashes when map files are enabled

Reported by: ydario 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 13 years ago by ydario

  • Milestone set to libc-0.6.1

comment:2 Changed 13 years ago by bird

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #27.

comment:3 Changed 13 years ago by bird

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