[PATCH] [PR 25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text

mlimber mlimber@gmail.com
Thu May 14 17:22:19 GMT 2020


I have replicated this bug in gdb versions 10.0.50.20200514-git and also
8.2-0ubuntu1~14.04.1. I am using an executable that dynamically links an
shared object with no text segment, viz., libicudata.so.52.2. (FWIW, lldb-8
does not crash with this same executable + library.)

I located a patch by Jeremie Courreges-Anglas here:
https://marc.info/?l=openbsd-ports&m=146569238229407&w=2. I applied said
patch, rebuilt gdb, and now I can debug the same executable with gdb.

I am not an expert on the inner workings of gdb, but I assume those who
review this code can better judge the overall soundness of this change.

I did not create a new test, but I can try it if necessary.

I have not previously completed an FSF copyright assignment. I have a
"request for disclaimer" email prepared to send if so directed by the gdb
maintainers.

Cheers!

M
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PR-symtab-25678-Set-entry-point-when-text-segment-is.patch
Type: application/octet-stream
Size: 1293 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20200514/ad8f0ac4/attachment.obj>


More information about the Gdb-patches mailing list