View Issue Details

IDProjectCategoryView StatusLast Update
0033425LazarusIDEpublic2019-10-11 23:48
ReporterCyrax Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinux i686OSArch 
Product Version1.9 (SVN) 
Summary0033425: When starting fresh built Lazarus trunk, an access violation error dialog shows up.
DescriptionExcerpt from attached log file:
TApplication.HandleException Access violation
  Stack trace:
  $089BB9A7  TIDESYNEDITOR__SETHIGHLIGHTUSERWORDCOUNT,  line 1536 of sourcesyneditor.pas
  $089BC57D  TIDESYNEDITOR__DESTROY,  line 1745 of sourcesyneditor.pas
  $089BC519  TIDESYNEDITOR__CREATE,  line 1741 of sourcesyneditor.pas
  $085D02A2  TSOURCEEDITOR__CREATEEDITOR,  line 4927 of sourceeditor.pp
  $085CAACB  TSOURCEEDITOR__CREATE,  line 3255 of sourceeditor.pp
  $085D7674  TSOURCENOTEBOOK__NEWSE,  line 7164 of sourceeditor.pp
  $085D9E12  TSOURCENOTEBOOK__NEWFILE,  line 7972 of sourceeditor.pp
  $08711CAA  TLAZSOURCEFILEMANAGER__NEWFILE,  line 2233 of sourcefilemanager.pas
  $080EEA50  TMAINIDE__DONEWFILE,  line 5558 of main.pp
  $084C8C2F  TLAZIDEINTERFACE__DONEWEDITORFILE,  line 758 of lazideintf.pas
  $0851A86A  TPROJECTAPPLICATIONDESCRIPTOR__CREATESTARTFILES,  line 172 of projectdescriptors.pas
  $08716F28  TLAZSOURCEFILEMANAGER__INITNEWPROJECT,  line 3950 of sourcefilemanager.pas
  $080F078E  TMAINIDE__DONEWPROJECT,  line 6213 of main.pp
  $080E31AB  TMAINIDE__SETUPSTARTPROJECT,  line 2328 of main.pp
  $080E0A2E  TMAINIDE__STARTIDE,  line 1605 of main.pp
Additional InformationLazarus trunk r57501 was built with FPC trunk r38520.

---
FPC was built with these options:
make clean \
all \
install \
OPT="-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -Sew- ${FPC_BUILD_OPTIONS}" \
COMPILER_OPTIONS="-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -dEXTDEBUG -Sew- ${FPC_BUILD_OPTIONS}" \
FPC=fpc \
REVSTR=${5} \
UPXPROG=echo \
IDE=1 \
NOWPOCYCLE=1 \
ALLOW_WARNINGS=1 \
INSTALL_PREFIX="${BINARY_TARGET_DIR}"


---

Lazarus was built with these options:
	make clean \
    all \
    FPC=fpc \
    "OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -gh -O- -Si- -vb -dHEAPTRC_WINDOW -dDBG_WITH_DEBUGGER_DEBUG" \
    UPXPROG=echo \
    USESVN2REVISIONINC=0
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0015582 resolvedFlorian FPC "-OaLOCALMIN=16" / "codealign LOCALMIN=16" is not reliable 

Activities

Cyrax

2018-03-13 23:43

reporter  

675129440-lazarus-debug.log (9,139 bytes)   
SetPrimaryConfigPath NewValue="/mnt/UUSI_OHJELMOINTI/ohjelmointi/pascal/binaries/lazarus2/i386/trunk/1.9.0/configs/normal-config" -> "/mnt/UUSI_OHJELMOINTI/ohjelmointi/pascal/binaries/lazarus2/i386/trunk/1.9.0/configs/normal-config"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/mnt/UUSI_OHJELMOINTI/ohjelmointi/pascal/binaries/lazarus2/i386/trunk/1.9.0/configs/normal-config"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-linux-gtk2 New=i386-linux-gtk2 FPC=True LCL=False
TComponentTreeView.SetSelection: Updating component node values.
DebugDataMonitor: TIdeThreadsMonitor.Clear
TApplication.HandleException Access violation
  Stack trace:
  $089BB9A7  TIDESYNEDITOR__SETHIGHLIGHTUSERWORDCOUNT,  line 1536 of sourcesyneditor.pas
  $089BC57D  TIDESYNEDITOR__DESTROY,  line 1745 of sourcesyneditor.pas
  $089BC519  TIDESYNEDITOR__CREATE,  line 1741 of sourcesyneditor.pas
  $085D02A2  TSOURCEEDITOR__CREATEEDITOR,  line 4927 of sourceeditor.pp
  $085CAACB  TSOURCEEDITOR__CREATE,  line 3255 of sourceeditor.pp
  $085D7674  TSOURCENOTEBOOK__NEWSE,  line 7164 of sourceeditor.pp
  $085D9E12  TSOURCENOTEBOOK__NEWFILE,  line 7972 of sourceeditor.pp
  $08711CAA  TLAZSOURCEFILEMANAGER__NEWFILE,  line 2233 of sourcefilemanager.pas
  $080EEA50  TMAINIDE__DONEWFILE,  line 5558 of main.pp
  $084C8C2F  TLAZIDEINTERFACE__DONEWEDITORFILE,  line 758 of lazideintf.pas
  $0851A86A  TPROJECTAPPLICATIONDESCRIPTOR__CREATESTARTFILES,  line 172 of projectdescriptors.pas
  $08716F28  TLAZSOURCEFILEMANAGER__INITNEWPROJECT,  line 3950 of sourcefilemanager.pas
  $080F078E  TMAINIDE__DONEWPROJECT,  line 6213 of main.pp
  $080E31AB  TMAINIDE__SETUPSTARTPROJECT,  line 2328 of main.pp
  $080E0A2E  TMAINIDE__STARTIDE,  line 1605 of main.pp
  $0805F0A1  main,  line 140 of lazarus.pp
----------------
LAZARUS END - cleaning up ...
[FORMS.PP] ExceptionOccurred 
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $089BB9A7  TIDESYNEDITOR__SETHIGHLIGHTUSERWORDCOUNT,  line 1536 of sourcesyneditor.pas
  $089BC57D  TIDESYNEDITOR__DESTROY,  line 1745 of sourcesyneditor.pas
  $0814CCB5  TCOMPONENT__DESTROYCOMPONENTS,  line 513 of ../objpas/classes/compon.inc
  $0814CC00  TCOMPONENT__DESTROY,  line 491 of ../objpas/classes/compon.inc
  $0829A253  TLCLCOMPONENT__DESTROY,  line 135 of lclclasses.pp
  $081C5C59  TCONTROL__DESTROY,  line 5146 of include/control.inc
  $081B67C6  TWINCONTROL__DESTROY,  line 6626 of include/wincontrol.inc
  $081C7E5B  TCUSTOMCONTROL__DESTROY,  line 40 of include/customcontrol.inc
  $080BF039  TSCROLLINGWINCONTROL__DESTROY,  line 316 of include/scrollingwincontrol.inc
  $080C060C  TCUSTOMFORM__DESTROY,  line 212 of include/customform.inc
  $085D42E6  TSOURCENOTEBOOK__DESTROY,  line 6269 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $085DD16B  TSOURCEEDITORMANAGERBASE__FREESOURCEWINDOWS,  line 9024 of sourceeditor.pp
  $085DE464  TSOURCEEDITORMANAGERBASE__DESTROY,  line 9506 of sourceeditor.pp
  $085E2B2C  TSOURCEEDITORMANAGER__DESTROY,  line 10989 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080D38DE  FREETHENNIL,  line 966 of lclproc.pas
TApplication.HandleException Access violation
  Stack trace:
  $089BB9A7  TIDESYNEDITOR__SETHIGHLIGHTUSERWORDCOUNT,  line 1536 of sourcesyneditor.pas
  $089BC57D  TIDESYNEDITOR__DESTROY,  line 1745 of sourcesyneditor.pas
  $0814CCB5  TCOMPONENT__DESTROYCOMPONENTS,  line 513 of ../objpas/classes/compon.inc
  $0814CC00  TCOMPONENT__DESTROY,  line 491 of ../objpas/classes/compon.inc
  $0829A253  TLCLCOMPONENT__DESTROY,  line 135 of lclclasses.pp
  $081C5C59  TCONTROL__DESTROY,  line 5146 of include/control.inc
  $081B67C6  TWINCONTROL__DESTROY,  line 6626 of include/wincontrol.inc
  $081C7E5B  TCUSTOMCONTROL__DESTROY,  line 40 of include/customcontrol.inc
  $080BF039  TSCROLLINGWINCONTROL__DESTROY,  line 316 of include/scrollingwincontrol.inc
  $080C060C  TCUSTOMFORM__DESTROY,  line 212 of include/customform.inc
  $085D42E6  TSOURCENOTEBOOK__DESTROY,  line 6269 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $085DD16B  TSOURCEEDITORMANAGERBASE__FREESOURCEWINDOWS,  line 9024 of sourceeditor.pp
  $085DE464  TSOURCEEDITORMANAGERBASE__DESTROY,  line 9506 of sourceeditor.pp
  $085E2B2C  TSOURCEEDITORMANAGER__DESTROY,  line 10989 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080D38DE  FREETHENNIL,  line 966 of lclproc.pas
[FORMS.PP] ExceptionOccurred 
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $085DE630  TSOURCEEDITORMANAGERBASE__MARKLINGPRODUCERCOUNT,  line 9547 of sourceeditor.pp
  $085DE3FD  TSOURCEEDITORMANAGERBASE__DESTROY,  line 9501 of sourceeditor.pp
  $085E2B2C  TSOURCEEDITORMANAGER__DESTROY,  line 10989 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080D38DE  FREETHENNIL,  line 966 of lclproc.pas
  $080E0C8F  TMAINIDE__DESTROY,  line 1655 of main.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080CC9A0  TAPPLICATION__DOBEFOREFINALIZATION,  line 1095 of include/application.inc
  $080BC69D  BEFOREFINALIZATION,  line 1922 of forms.pp
  $080793A2  INTERNALEXIT,  line 1043 of ../inc/system.inc
  $08079508  fpc_do_exit,  line 1113 of ../inc/system.inc
  $0807955E  HALT,  line 1136 of ../inc/system.inc
  $08075AA6  DOUNHANDLEDEXCEPTION,  line 145 of ../inc/except.inc
  $08075DB1  fpc_reraise,  line 277 of ../inc/except.inc
  $080E0F00  TMAINIDE__DESTROY,  of main.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $0805F1A5  main,  line 160 of lazarus.pp
TApplication.HandleException Access violation
  Stack trace:
  $085DE630  TSOURCEEDITORMANAGERBASE__MARKLINGPRODUCERCOUNT,  line 9547 of sourceeditor.pp
  $085DE3FD  TSOURCEEDITORMANAGERBASE__DESTROY,  line 9501 of sourceeditor.pp
  $085E2B2C  TSOURCEEDITORMANAGER__DESTROY,  line 10989 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080D38DE  FREETHENNIL,  line 966 of lclproc.pas
  $080E0C8F  TMAINIDE__DESTROY,  line 1655 of main.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080CC9A0  TAPPLICATION__DOBEFOREFINALIZATION,  line 1095 of include/application.inc
  $080BC69D  BEFOREFINALIZATION,  line 1922 of forms.pp
  $080793A2  INTERNALEXIT,  line 1043 of ../inc/system.inc
  $08079508  fpc_do_exit,  line 1113 of ../inc/system.inc
  $0807955E  HALT,  line 1136 of ../inc/system.inc
  $08075AA6  DOUNHANDLEDEXCEPTION,  line 145 of ../inc/except.inc
  $08075DB1  fpc_reraise,  line 277 of ../inc/except.inc
  $080E0F00  TMAINIDE__DESTROY,  of main.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $0805F1A5  main,  line 160 of lazarus.pp
[FORMS.PP] ExceptionOccurred 
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $085E2B19  TSOURCEEDITORMANAGER__DESTROY,  line 10987 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080D38DE  FREETHENNIL,  line 966 of lclproc.pas
  $080E0C8F  TMAINIDE__DESTROY,  line 1655 of main.pp
  $0814CCB5  TCOMPONENT__DESTROYCOMPONENTS,  line 513 of ../objpas/classes/compon.inc
  $0814CC00  TCOMPONENT__DESTROY,  line 491 of ../objpas/classes/compon.inc
  $0832814D  TCUSTOMAPPLICATION__DESTROY,  line 302 of fcl-base/src/custapp.pp
  $080CAA0B  TAPPLICATION__DESTROY,  line 167 of include/application.inc
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080BD25C  FREEWIDGETSET,  line 2222 of forms.pp
  $080B9F68  INTERFACES_$$_finalize$,  line 38 of interfaces.pas
  $08079232  FINALIZEUNITS,  line 989 of ../inc/system.inc
  $080794C5  INTERNALEXIT,  line 1070 of ../inc/system.inc
  $08079508  fpc_do_exit,  line 1113 of ../inc/system.inc
  $0807955E  HALT,  line 1136 of ../inc/system.inc
  $08075AA6  DOUNHANDLEDEXCEPTION,  line 145 of ../inc/except.inc
  $08075DB1  fpc_reraise,  line 277 of ../inc/except.inc
TApplication.HandleException Access violation
  Stack trace:
  $085E2B19  TSOURCEEDITORMANAGER__DESTROY,  line 10987 of sourceeditor.pp
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080D38DE  FREETHENNIL,  line 966 of lclproc.pas
  $080E0C8F  TMAINIDE__DESTROY,  line 1655 of main.pp
  $0814CCB5  TCOMPONENT__DESTROYCOMPONENTS,  line 513 of ../objpas/classes/compon.inc
  $0814CC00  TCOMPONENT__DESTROY,  line 491 of ../objpas/classes/compon.inc
  $0832814D  TCUSTOMAPPLICATION__DESTROY,  line 302 of fcl-base/src/custapp.pp
  $080CAA0B  TAPPLICATION__DESTROY,  line 167 of include/application.inc
  $08074352  TOBJECT__FREE,  line 336 of ../inc/objpas.inc
  $080BD25C  FREEWIDGETSET,  line 2222 of forms.pp
  $080B9F68  INTERFACES_$$_finalize$,  line 38 of interfaces.pas
  $08079232  FINALIZEUNITS,  line 989 of ../inc/system.inc
  $080794C5  INTERNALEXIT,  line 1070 of ../inc/system.inc
  $08079508  fpc_do_exit,  line 1113 of ../inc/system.inc
  $0807955E  HALT,  line 1136 of ../inc/system.inc
  $08075AA6  DOUNHANDLEDEXCEPTION,  line 145 of ../inc/except.inc
  $08075DB1  fpc_reraise,  line 277 of ../inc/except.inc
675129440-lazarus-debug.log (9,139 bytes)   

Cyrax

2018-03-14 00:06

reporter   ~0107092

There is no problem, if Lazarus is built with QT interface. Only GTK2 is causing this bug to occur.

Cyrax

2018-03-14 01:40

reporter   ~0107095

When I fixed the access violation in the TIDESYNEDITOR__SETHIGHLIGHTUSERWORDCOUNT, line 1536 of sourcesyneditor.pas , this comes up.

#0 ?? at :0
0000001 ?? at :0
0000002 ?? at :0
0000003 ?? at :0
0000004 hb_ot_layout_lookup_collect_glyphs at :0
0000005 ?? at :0
0000006 ?? at :0
0000007 ?? at :0
0000008 FT_Load_Glyph at :0
0000009 ?? at :0
0000010 ?? at :0
0000011 ?? at :0
0000012 cairo_scaled_font_glyph_extents at :0
0000013 ?? at :0
0000014 ?? at :0
0000015 ?? at :0
0000016 hb_shape_plan_execute at :0
0000017 hb_shape_full at :0
0000018 hb_shape at :0
0000019 ?? at :0
0000020 pango_shape_full at :0
0000021 ?? at :0
0000022 ?? at :0
0000023 ?? at :0
0000024 ?? at :0
0000025 pango_layout_get_pixel_extents at :0
0000026 pango_layout_get_pixel_size at :0
0000027 FONTISDOUBLEBYTECHARSFONT(0x9538260) at gtk2/gtk2proc.inc:9264
0000028 TGTK2WIDGETSET__UPDATEDCTEXTMETRIC(0xf6891060, 0xf6721da0) at gtk2/gtk2widgetset.inc:5890
0000029 TGTK2WIDGETSET__GETFONTLANGUAGEINFO(0xf6891060, 4134673824) at gtk2/gtk2winapi.inc:4891
0000030 GETFONTLANGUAGEINFO(4134673824) at include/winapi.inc:408
0000031 THEFONTSINFOMANAGER__CREATEFONTSINFO(0xf4d83a10, 0xf4e79b60) at syntextdrawer.pp:487
0000032 THEFONTSINFOMANAGER__GETFONTSINFO(0xf4d83a10, 0xf4e79b60) at syntextdrawer.pp:519
0000033 THEFONTSTOCK__SETBASEFONT(0xf4e4ac80, 0xf4e79b60) at syntextdrawer.pp:850
0000034 THETEXTDRAWER__SETBASEFONT(0xf4e33d60, 0xf4e79b60) at syntextdrawer.pp:1074
0000035 TCUSTOMSYNEDIT__RECALCCHAREXTENT(0xf4eb3ec0) at synedit.pp:8088
0000036 TCUSTOMSYNEDIT__FONTCHANGED(0xf4eb3ec0, 0xf4e79920) at synedit.pp:2580
0000037 TFPCANVASHELPER__CHANGED(0xf4e79920) at fcl-image/src/fphelper.inc:70
0000038 TFONT__CHANGED(0xf4e79920) at include/font.inc:1359
0000039 TFONT__ENDUPDATE(0xf4e79920) at include/font.inc:745
0000040 TFONT__ASSIGN(0xf4e79920, 0xf4e79b60) at include/font.inc:665
0000041 TCUSTOMSYNEDIT__CREATE(0xf4eb3ec0, 0x0, 0xf4eb12b0) at synedit.pp:2204
0000042 TIDESYNEDITOR__CREATE(0xf4eb3ec0, 0x1, 0xf4eb12b0) at sourcesyneditor.pas:1685
0000043 TSOURCEEDITOR__CREATEEDITOR(0xf4f97640, 0xf4eb12b0, 0xf4eb29c0) at sourceeditor.pp:4927
0000044 TSOURCEEDITOR__CREATE(0xf4f97640, 0x1, 0xf4eb12b0, 0xf4eb29c0, 0x0) at sourceeditor.pp:3255
0000045 TSOURCENOTEBOOK__NEWSE(0xf4eb12b0, 0, -1, 0x0, 0xf504812c 'unit1') at sourceeditor.pp:7164
0000046 TSOURCENOTEBOOK__NEWFILE(0xf4eb12b0, 0xf5046fec 'unit1', 0xf4e65360, true, 0x0) at sourceeditor.pp:7972
0000047 TLAZSOURCEFILEMANAGER__NEWFILE(0xf5000140, 0xf5ae7600, 0xf502f6cc 'unit1.pas', 0x0, [NFISPARTOFPROJECT, NFOPENINEDITOR, NFCREATEDEFAULTSRC], 0x0) at sourcefilemanager.pas:2233
0000048 TMAINIDE__DONEWFILE(0xf64e6230, 0xf5ae7600, 0xf502f6cc 'unit1.pas', 0x0, [NFISPARTOFPROJECT, NFOPENINEDITOR, NFCREATEDEFAULTSRC], 0x0) at main.pp:5558
0000049 TLAZIDEINTERFACE__DONEWEDITORFILE(0xf64e6230, 0xf5ae7600, 0xf502f6cc 'unit1.pas', 0x0, [NFISPARTOFPROJECT, NFOPENINEDITOR, NFCREATEDEFAULTSRC]) at lazideintf.pas:758
0000050 TPROJECTAPPLICATIONDESCRIPTOR__CREATESTARTFILES(0xf5a490b0, 0xf5230210) at projectdescriptors.pas:172
0000051 TLAZSOURCEFILEMANAGER__INITNEWPROJECT(0xf5000140, 0xf5a490b0) at sourcefilemanager.pas:3950
0000052 TMAINIDE__DONEWPROJECT(0xf64e6230, 0xf5a490b0) at main.pp:6213
#53 TMAINIDE__SETUPSTARTPROJECT(0xf64e6230) at main.pp:2328
#54 TMAINIDE__STARTIDE(0xf64e6230) at main.pp:1605
0000055 main at lazarus.pp:140

Cyrax

2018-03-14 03:20

reporter   ~0107096

This bug report may be related to this one : https://bugs.freepascal.org/view.php?id=15582

Cyrax

2018-03-14 03:22

reporter   ~0107097

Last edited: 2018-03-14 03:23

View 2 revisions

Oh, yes. I forgot to mention that both FPC and Lazarus are 32-bit.

EDIT : 64-bit version of Lazarus with GTK2 widget works.

Juha Manninen

2018-03-14 08:41

developer   ~0107101

I fixed the Platform field.
Please try building with a released version of FPC.

Cyrax

2018-03-14 16:44

reporter   ~0107110

Er, the platform field was correct. FPC and Lazarus are running on top 64-bit Linux.

Juha Manninen

2018-03-15 10:45

developer   ~0107130

Cyrax, how can you run 32-bit binaries on top of a 64-bit Linux? Is it special for Arch Linux?

Cyrax

2018-03-15 17:43

reporter   ~0107137

Every 64-bit kernel can run 32-bit programs, if there is sufficient libraries installed. In Arch you need to enable multilib repository and install needed libraries from it.

Cyrax

2018-03-19 03:07

reporter   ~0107247

Building Lazarus trunk with released version of FPC gives same Access Violation error.

If I build normal application with GTK2 interface, everything works at it should. But if I add TSynEdit component into the mix, Access Violation error occurs.

---

Assembler output on the faulting location.

F6BC305E 660febc1                 por    %xmm1,%xmm0
F6BC3062 660fd603                 movq   %xmm0,(%ebx)
F6BC3066 83c43c                   add    $0x3c,%esp
F6BC3069 5b                       pop    %ebx
F6BC306A 5e                       pop    %esi
F6BC306B 5f                       pop    %edi
F6BC306C 5d                       pop    %ebp
F6BC306D c3                       ret    
F6BC306E 6690                     xchg   %ax,%ax
F6BC3070 660ffb442410             psubq  0x10(%esp),%xmm0  <-- at here the error occurs
F6BC3076 660feb0424               por    (%esp),%xmm0
F6BC307B 660fd603                 movq   %xmm0,(%ebx)
F6BC307F 83c43c                   add    $0x3c,%esp
F6BC3082 5b                       pop    %ebx
F6BC3083 5e                       pop    %esi
F6BC3084 5f                       pop    %edi
F6BC3085 5d                       pop    %ebp
F6BC3086 c3                       ret    
F6BC3087 6690                     xchg   %ax,%ax
F6BC3089 6690                     xchg   %ax,%ax
F6BC308B 6690                     xchg   %ax,%ax
F6BC308D 6690                     xchg   %ax,%ax
F6BC308F 90                       nop
F6BC3090 55                       push   %ebp
F6BC3091 57                       push   %edi
F6BC3092 56                       push   %esi
F6BC3093 53                       push   %ebx
F6BC3094 8b7c2414                 mov    0x14(%esp),%edi
F6BC3098 8b5c2418                 mov    0x18(%esp),%ebx
F6BC309C 8b5738                   mov    0x38(%edi),%edx
F6BC309F c1eb0a                   shr    $0xa,%ebx
F6BC30A2 83ea01                   sub    $0x1,%edx
F6BC30A5 782d                     js     0xf6bc30d4
F6BC30A7 8b7740                   mov    0x40(%edi),%esi

Juha Manninen

2018-03-20 12:08

developer   ~0107288

Last edited: 2018-03-20 12:09

View 2 revisions

Could it be related to the Arch multilib libraries?
Does the crash happen also with native 32-bit OS? Ok, I know many distros have discontinued their 32-bit versions which is unfortunate.

Cyrax

2018-03-24 07:03

reporter  

info.tar.gz (42,647 bytes)

Cyrax

2018-03-24 07:08

reporter   ~0107381

It seems that 32bit version of libharfbuzz.so is the culprit.

Cyrax

2018-03-24 07:49

reporter   ~0107384

It seems that rebuidling Arch multilib package lib32-harfbuzz with gcc/g++ options -mstackrealign -mincoming-stack-boundary=2 allow the Lazarus IDE to run.

Juha Manninen

2018-03-25 13:40

developer   ~0107408

Why only this libharfbuzz causes a problem? How is it used in Lazarus? Is it used somehow wrong?
Page : https://www.freedesktop.org/wiki/Software/HarfBuzz/
says "HarfBuzz is an OpenType text shaping engine".
I had never heard of it before.

Cyrax

2018-06-11 03:19

reporter   ~0108822

Due to recent updates in Arch, lib32-libmng (needs to get from AUR repository) and lib32-glib2 needs to rebuilt with options -mstackrealign -mincoming-stack-boundary=2 .

Marco van de Voort

2018-10-23 16:00

manager   ~0111525

If arch forces this on all its packages, it should simply also modify its FPC and Lazarus packages to align?

Cyrax

2018-10-29 07:10

reporter   ~0111646

Only i386 needs the alignment fix, all x86_64 binaries are OK. Fixing FPC i386 would take considerable effort, like Jonas Maebe says in this note https://bugs.freepascal.org/view.php?id=15582#c104484

This is all due to non-documented i386 SYSV ABI breakage by GCC devs : https://bugs.freepascal.org/view.php?id=15582#c73804

Also Arch has officially dropped their support for i386/i386 target : https://www.archlinux.org/news/the-end-of-i686-support/

However, you can still run your i386 apps on top x86_64 kernel.

Juha Manninen

2018-10-29 09:37

developer   ~0111647

How to solve this then?

Daniel Glöckner

2018-10-29 10:59

reporter   ~0111648

Last edited: 2018-10-29 11:01

View 2 revisions

Saying that the ABI breakage is not documented is not correct. As I said in 0032710 it is documented in https://www.uclibc.org/docs/psABI-i386.pdf.

I'm still for changing "stackalign" to 16 for x86-32. The only cases that would remain broken are those where Pascal code (directly or indirectly) calls hand written assembly code or old precompiled code that (directly or indirectly) calls code that needs the new stack alignment with a wrong stack alignment. On Linux in 99,99% of all cases you either get libraries as precompiled code from the Linux distro or you compile them yourself. So if there are still crashes due to some bad code that does not conform to the new ABI, you can either file a bug in your distro's bug tracker or fix it yourself.

Cyrax

2019-10-11 23:24

reporter   ~0118498

From FPC trunk r43014 onward the i386-linux target has its default stack alignment set to 16 byte boundary, so this bug report is obsolete now.
Please resolve as no change required.

Issue History

Date Modified Username Field Change
2018-03-13 23:43 Cyrax New Issue
2018-03-13 23:43 Cyrax File Added: 675129440-lazarus-debug.log
2018-03-14 00:06 Cyrax Note Added: 0107092
2018-03-14 01:40 Cyrax Note Added: 0107095
2018-03-14 03:20 Cyrax Note Added: 0107096
2018-03-14 03:22 Cyrax Note Added: 0107097
2018-03-14 03:23 Cyrax Note Edited: 0107097 View Revisions
2018-03-14 08:40 Juha Manninen LazTarget => -
2018-03-14 08:40 Juha Manninen Platform Linux x86_64 => Linux i686
2018-03-14 08:41 Juha Manninen Note Added: 0107101
2018-03-14 16:44 Cyrax Note Added: 0107110
2018-03-15 10:45 Juha Manninen Note Added: 0107130
2018-03-15 17:43 Cyrax Note Added: 0107137
2018-03-19 03:07 Cyrax Note Added: 0107247
2018-03-20 12:08 Juha Manninen Note Added: 0107288
2018-03-20 12:09 Juha Manninen Note Edited: 0107288 View Revisions
2018-03-24 07:03 Cyrax File Added: info.tar.gz
2018-03-24 07:08 Cyrax Note Added: 0107381
2018-03-24 07:49 Cyrax Note Added: 0107384
2018-03-25 13:40 Juha Manninen Note Added: 0107408
2018-06-11 03:19 Cyrax Note Added: 0108822
2018-10-23 16:00 Marco van de Voort Note Added: 0111525
2018-10-29 07:10 Cyrax Note Added: 0111646
2018-10-29 09:36 Juha Manninen Relationship added related to 0015582
2018-10-29 09:37 Juha Manninen Note Added: 0111647
2018-10-29 10:59 Daniel Glöckner Note Added: 0111648
2018-10-29 11:01 Daniel Glöckner Note Edited: 0111648 View Revisions
2019-10-11 23:24 Cyrax Note Added: 0118498
2019-10-11 23:48 Martin Friebe Status new => resolved
2019-10-11 23:48 Martin Friebe Resolution open => no change required
2019-10-11 23:48 Martin Friebe Widgetset GTK 2 => GTK 2
2019-10-11 23:48 Martin Friebe Status resolved => closed