[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/19576] bogus code generation with on SunOS with 2.26
From: |
richard at netbsd dot org |
Subject: |
[Bug gas/19576] bogus code generation with on SunOS with 2.26 |
Date: |
Fri, 08 Jul 2016 11:56:01 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19576
--- Comment #9 from Richard PALO <richard at netbsd dot org> ---
I believe the issue comes down to dtrace updating its symbol from
'__dtrace_Xserver___resource__free' to '__dtrace_Xserver___resource-free'
given that the input object file's strtab doesn't have a separate 'free' entry,
it seems to be riding on (optimised) to the tail end of
__dtrace_Xserver___resource__free'.
when dtrace updates the symbol, 'free' is effectively left shifted by 1
character.
before:
address@hidden:/home/richard/src/tdtrace$ dump -c resource.o.orig
resource.o.orig:
**** STRING TABLE INFORMATION ****
.shstrtab:
<offset> Name
<0>
<1> .symtab
<9> .strtab
<17> .shstrtab
<27> .rel.text
<37> .data
<43> .bss
<48> .text.unlikely
<63> .rodata.str1.1
<78> .rel.rodata
<90> .rodata.str1.4
<105> .rel.data.rel.ro
<122> .comment
.strtab:
<offset> Name
<0>
<1> resource.c
<12> GetDefaultBytes
<28> DefaultFindSubRes
<46> FindWindowSubRes
<63> FindGCSubRes
<76> GetPixmapBytes
<91> doFreeResource
<106> resourceTypes
<120> lastResourceClass
<138> GetGcBytes
<149> GetWindowBytes
<164> clientTable
<176> predefTypes
<188> __func__.15628
<203> AvailableID.part.1
<222> .L100
<228> .LC16
<234> .LC17
<240> .LC21
<246> .LC23
<252> .LC24
<258> .L89
<263> .L91
<268> .L92
<273> .L93
<278> .L94
<283> _GLOBAL_OFFSET_TABLE_
<305> ResourceStateCallback
<327> _CallCallbacks
<342> TypeMask
<351> CreateNewResourceType
<373> lastResourceType
<390> xreallocarray
<404> RegisterResourceName
<425> GetResourceTypeSizeFunc
<449> SetResourceTypeSizeFunc
<473> SetResourceTypeFindSubResFunc
<503> SetResourceTypeErrorValue
<529> CreateNewResourceClass
<552> ResourceClientBits
<571> LimitClients
<584> InitClientResources
<604> serverClient
<617> malloc
<624> HashResourceID
<639> __assert_c99
<652> GetXIDRange
<664> FakeClientID
<677> clients
<685> MarkClientException
<705> FatalError
<716> AddResource
<728> LookupResourceName
<747> __dtrace_Xserver___resource__alloc
<782> ErrorF
<789> __dtrace_Xserver___resource__free
<823> FreeResourceByType
<842> ChangeResourceValue
<862> FindClientResourcesByType
<888> FindSubResources
<905> FindAllClientResources
<928> LookupClientResourceComplex
<956> FreeClientNeverRetainResources
<987> FreeClientResources
<1007> HandleSaveSet
<1021> FreeAllResources
<1038> currentMaxClients
<1056> dixLookupResourceByType
<1080> XaceHook
<1089> dixLookupResourceByClass
<1114> GetXIDList
<1125> LegalNewID
<1136> noPanoramiXExtension
<1157> NoopDDA
<1165> DeleteWindow
<1178> dixDestroyPixmap
<1195> FreeGC
<1202> CloseFont
<1212> FreeCursor
<1223> FreeColormap
<1236> FreeClientPixels
<1253> OtherClientGone
<1269> DeletePassiveGrab
after:
address@hidden:/home/richard/src/tdtrace$ dump -c resource.o
resource.o:
**** STRING TABLE INFORMATION ****
.shstrtab:
<offset> Name
<0>
<1> .symtab
<9> .strtab
<17> .shstrtab
<27> .rel.text
<37> .data
<43> .bss
<48> .text.unlikely
<63> .rodata.str1.1
<78> .rel.rodata
<90> .rodata.str1.4
<105> .rel.data.rel.ro
<122> .comment
.strtab:
<offset> Name
<0>
<1> resource.c
<12> GetDefaultBytes
<28> DefaultFindSubRes
<46> FindWindowSubRes
<63> FindGCSubRes
<76> GetPixmapBytes
<91> doFreeResource
<106> resourceTypes
<120> lastResourceClass
<138> GetGcBytes
<149> GetWindowBytes
<164> clientTable
<176> predefTypes
<188> __func__.15628
<203> AvailableID.part.1
<222> .L100
<228> .LC16
<234> .LC17
<240> .LC21
<246> .LC23
<252> .LC24
<258> .L89
<263> .L91
<268> .L92
<273> .L93
<278> .L94
<283> _GLOBAL_OFFSET_TABLE_
<305> ResourceStateCallback
<327> _CallCallbacks
<342> TypeMask
<351> CreateNewResourceType
<373> lastResourceType
<390> xreallocarray
<404> RegisterResourceName
<425> GetResourceTypeSizeFunc
<449> SetResourceTypeSizeFunc
<473> SetResourceTypeFindSubResFunc
<503> SetResourceTypeErrorValue
<529> CreateNewResourceClass
<552> ResourceClientBits
<571> LimitClients
<584> InitClientResources
<604> serverClient
<617> malloc
<624> HashResourceID
<639> __assert_c99
<652> GetXIDRange
<664> FakeClientID
<677> clients
<685> MarkClientException
<705> FatalError
<716> AddResource
<728> LookupResourceName
<747> __dtrace_Xserver___resource-alloc
<781>
<782> ErrorF
<789> __dtrace_Xserver___resource-free
<822>
<823> FreeResourceByType
<842> ChangeResourceValue
<862> FindClientResourcesByType
<888> FindSubResources
<905> FindAllClientResources
<928> LookupClientResourceComplex
<956> FreeClientNeverRetainResources
<987> FreeClientResources
<1007> HandleSaveSet
<1021> FreeAllResources
<1038> currentMaxClients
<1056> dixLookupResourceByType
<1080> XaceHook
<1089> dixLookupResourceByClass
<1114> GetXIDList
<1125> LegalNewID
<1136> noPanoramiXExtension
<1157> NoopDDA
<1165> DeleteWindow
<1178> dixDestroyPixmap
<1195> FreeGC
<1202> CloseFont
<1212> FreeCursor
<1223> FreeColormap
<1236> FreeClientPixels
<1253> OtherClientGone
<1269> DeletePassiveGrab
It seems dangerous to merge partial strings (for reasons such as this),
is it explicitly allowed in the ELF i386 ABI? That is, is it possible
that the anomaly is in binutil as opposed to dtrace (in this case).
BTW the illumos issue is https://www.illumos.org/issues/6653
where the files are presented in a manner to easily reproduce the problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/19576] bogus code generation with on SunOS with 2.26,
richard at netbsd dot org <=
- [Bug gas/19576] bogus code generation with on SunOS with 2.26, richard at netbsd dot org, 2016/07/12
- [Bug gas/19576] bogus code generation with on SunOS with 2.26, hjl.tools at gmail dot com, 2016/07/12
- [Bug gas/19576] bogus code generation with on SunOS with 2.26, richard at netbsd dot org, 2016/07/12
- [Bug gas/19576] bogus code generation with on SunOS with 2.26, hjl.tools at gmail dot com, 2016/07/12
- [Bug gas/19576] bogus code generation with on SunOS with 2.26, amodra at gmail dot com, 2016/07/13