View Issue Details

IDProjectCategoryView StatusLast Update
0037559FPCCompilerpublic2020-08-13 14:44
Reporterolivier Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037559: Revision 44926 has broke the Haiku target : make zipinstall does not cycle anymore : segment violation
DescriptionThe change in r44926 is not equivalent to the previous implementation : it has a side effect for the Haiku elf target.
I think part of the implementation of the sectiontype2options method should apply only to the coff target as before.

I am not familiar enough with this part of the compiler, so i am not sure of my patch. Maybe there is a better way.
Steps To Reproducemake zipinstall
TagsNo tags attached.
Fixed in Revision46410
FPCOldBugId
FPCTarget-
Attached Files

Activities

olivier

2020-08-12 22:14

reporter  

ogbase.pas_r46369_2.diff (1,032 bytes)   
Index: compiler/ogbase.pas
===================================================================
--- compiler/ogbase.pas	(revision 46369)
+++ compiler/ogbase.pas	(working copy)
@@ -1315,13 +1315,16 @@
           {arm_attribute} [oso_data]
         );
       begin
-        if (aType in [sec_rodata,sec_rodata_norel]) then
+        if target_info.assem in [as_i386_pecoff, as_x86_64_pecoff, as_arm_pecoffwince] then
           begin
-            if (target_info.system in systems_all_windows) then
-              aType:=sec_rodata_norel
-            else
-              aType:=sec_data;
-          end;
+            if (aType in [sec_rodata,sec_rodata_norel]) then
+              begin
+                if (target_info.system in systems_all_windows) then
+                  aType:=sec_rodata_norel
+                else
+                  aType:=sec_data;
+              end;
+            end;
         result:=secoptions[atype];
 {$ifdef OMFOBJSUPPORT}
         { in the huge memory model, BSS data is actually written in the regular
ogbase.pas_r46369_2.diff (1,032 bytes)   

Sven Barth

2020-08-13 07:44

manager   ~0124817

Your listing of COFF writers was not entirely complete (you forgot the non-PE targets for which this should apply) and you checked the wrong assembler (current_target.assem is only the template, the really used assembler is target_asm).

Please test and close if okay.

olivier

2020-08-13 14:44

reporter   ~0124840

Fixed

Thank you !

Issue History

Date Modified Username Field Change
2020-08-12 22:14 olivier New Issue
2020-08-12 22:14 olivier File Added: ogbase.pas_r46369_2.diff
2020-08-12 22:28 Sven Barth Assigned To => Sven Barth
2020-08-12 22:28 Sven Barth Status new => assigned
2020-08-13 07:44 Sven Barth Status assigned => resolved
2020-08-13 07:44 Sven Barth Resolution open => fixed
2020-08-13 07:44 Sven Barth Fixed in Version => 3.3.1
2020-08-13 07:44 Sven Barth Fixed in Revision => 46410
2020-08-13 07:44 Sven Barth FPCTarget => -
2020-08-13 07:44 Sven Barth Note Added: 0124817
2020-08-13 14:44 olivier Status resolved => closed
2020-08-13 14:44 olivier Note Added: 0124840