* SYMBOL_LANGUAGE assertion failure on AIX
@ 2018-10-15 12:56 Sangamesh Mallayya
2018-10-18 15:16 ` Ulrich Weigand
0 siblings, 1 reply; 5+ messages in thread
From: Sangamesh Mallayya @ 2018-10-15 12:56 UTC (permalink / raw)
To: gdb-patches, Ulrich Weigand
[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]
Hi All,
Lot of gdb testcases are failing due assertion failures on AIX with the
error below.
(gdb) br main
Breakpoint 1 at 0x1000075c: file
/home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c, line 67.
(gdb) r
Starting program:
/home/gdb_build/binutils-gdb/gdb/testsuite/outputs/gdb.base/savedregs/savedregs
Breakpoint 1, main ()
at /home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c:67
67 signal (SIGILL, catcher);
(gdb) s
dictionary.c:690: internal-error: void insert_symbol_hashed(dictionary*,
symbol*): Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE
(dict)->la_language' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
This error seems to be happening after the fix
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5ffa0793690b42b2a0c1c21dbb5e64634e58fa00
Attached patch resolves the assertion failure and gdb is able to debug
the program further.
(gdb) br main
Breakpoint 1 at 0x1000075c: file
/home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c, line 67.
(gdb) r
Starting program:
/home/gdb_build/binutils-gdb/gdb/testsuite/outputs/gdb.base/savedregs/savedregs
Breakpoint 1, main ()
at /home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c:67
67 signal (SIGILL, catcher);
(gdb) s
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
68 signal (SIGSEGV, catcher);
(gdb) s
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x10000804 in read in psymtab, but not in
symtab.)
69 thrower ();
(gdb) s
thrower ()
at /home/gdb_build/binutils-gdb/gdb/testsuite/gdb.base/savedregs.c:49
49 *(char *)0 = 0;
(gdb)
Please let me know the comments.
Thanks,
Sangamesh
[-- Attachment #2: aix_assertion_failure.patch --]
[-- Type: application/octet-stream, Size: 1582 bytes --]
--- ./gdb/xcoffread.c_orig 2018-10-15 04:03:45 +0000
+++ ./gdb/xcoffread.c 2018-10-15 06:44:59 +0000
@@ -1022,6 +1022,7 @@
int just_started = 1;
int depth = 0;
CORE_ADDR fcn_start_addr = 0;
+ enum language pst_symtab_language;
struct coff_symbol fcn_stab_saved = { 0 };
@@ -1042,10 +1043,11 @@
set_last_source_file (NULL);
last_csect_name = 0;
+ pst_symtab_language = deduce_language_from_filename(filestring);
start_stabs ();
start_symtab (objfile, filestring, (char *) NULL, file_start_addr,
- language_unknown);
+ pst_symtab_language);
record_debugformat (debugfmt);
symnum = ((struct symloc *) pst->read_symtab_private)->first_symnum;
max_symnum =
@@ -1138,8 +1140,8 @@
}
start_stabs ();
- start_symtab (objfile, "_globals_", (char *) NULL, (CORE_ADDR) 0,
- language_unknown);
+ start_symtab (objfile, "_globals_", (char *) NULL,
+ (CORE_ADDR) 0, pst_symtab_language);
record_debugformat (debugfmt);
cur_src_end_addr = first_object_file_end;
/* Done with all files, everything from here on is globals. */
@@ -1229,7 +1231,7 @@
/* Give all csects for this source file the same
name. */
start_symtab (objfile, filestring, NULL,
- (CORE_ADDR) 0, language_unknown);
+ (CORE_ADDR) 0, pst_symtab_language);
record_debugformat (debugfmt);
}
@@ -1350,7 +1352,7 @@
start_stabs ();
start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0,
- language_unknown);
+ pst_symtab_language);
record_debugformat (debugfmt);
last_csect_name = 0;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SYMBOL_LANGUAGE assertion failure on AIX
2018-10-15 12:56 SYMBOL_LANGUAGE assertion failure on AIX Sangamesh Mallayya
@ 2018-10-18 15:16 ` Ulrich Weigand
2018-10-23 12:09 ` [PATCH] " Sangamesh Mallayya
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Weigand @ 2018-10-18 15:16 UTC (permalink / raw)
To: Sangamesh Mallayya; +Cc: gdb-patches, Ulrich Weigand
Sangamesh Mallaya wrote:
> Lot of gdb testcases are failing due assertion failures on AIX with the
> error below.
The patch makes sense to me.
You'll need a ChangeLog entry; patch is OK with that.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] SYMBOL_LANGUAGE assertion failure on AIX
2018-10-18 15:16 ` Ulrich Weigand
@ 2018-10-23 12:09 ` Sangamesh Mallayya
2018-10-24 18:04 ` Ulrich Weigand
0 siblings, 1 reply; 5+ messages in thread
From: Sangamesh Mallayya @ 2018-10-23 12:09 UTC (permalink / raw)
To: Ulrich Weigand, Keith Seitz; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]
Hi Ulrich
Thanks for the review and comments.
Attaching the changelog file and git formatted patch.
Thanks,
Sangamesh
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: Sangamesh Mallayya/India/IBM@IBMIN
Cc: gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com (Ulrich
Weigand)
Date: 10/18/2018 08:45 PM
Subject: Re: SYMBOL_LANGUAGE assertion failure on AIX
Sangamesh Mallaya wrote:
> Lot of gdb testcases are failing due assertion failures on AIX with the
> error below.
The patch makes sense to me.
You'll need a ChangeLog entry; patch is OK with that.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
[-- Attachment #2: aix_assertion_failure.patch --]
[-- Type: application/octet-stream, Size: 1963 bytes --]
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 941471a..acf0959 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1022,6 +1022,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
int just_started = 1;
int depth = 0;
CORE_ADDR fcn_start_addr = 0;
+ enum language pst_symtab_language;
struct coff_symbol fcn_stab_saved = { 0 };
@@ -1042,10 +1043,11 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
set_last_source_file (NULL);
last_csect_name = 0;
+ pst_symtab_language = deduce_language_from_filename (filestring);
start_stabs ();
start_symtab (objfile, filestring, (char *) NULL, file_start_addr,
- language_unknown);
+ pst_symtab_language);
record_debugformat (debugfmt);
symnum = ((struct symloc *) pst->read_symtab_private)->first_symnum;
max_symnum =
@@ -1138,8 +1140,8 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
}
start_stabs ();
- start_symtab (objfile, "_globals_", (char *) NULL, (CORE_ADDR) 0,
- language_unknown);
+ start_symtab (objfile, "_globals_", (char *) NULL,
+ (CORE_ADDR) 0, pst_symtab_language);
record_debugformat (debugfmt);
cur_src_end_addr = first_object_file_end;
/* Done with all files, everything from here on is globals. */
@@ -1229,7 +1231,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
/* Give all csects for this source file the same
name. */
start_symtab (objfile, filestring, NULL,
- (CORE_ADDR) 0, language_unknown);
+ (CORE_ADDR) 0, pst_symtab_language);
record_debugformat (debugfmt);
}
@@ -1350,7 +1352,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
start_stabs ();
start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0,
- language_unknown);
+ pst_symtab_language);
record_debugformat (debugfmt);
last_csect_name = 0;
[-- Attachment #3: ChangeLog --]
[-- Type: application/octet-stream, Size: 180 bytes --]
2018-10-23 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Ulrich Weigand <uweigand@de.ibm.com>
* xcoffread.c (read_xcoff_symtab): Fix SYMBOL_LANGUAGE assertion
failure.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] SYMBOL_LANGUAGE assertion failure on AIX
2018-10-23 12:09 ` [PATCH] " Sangamesh Mallayya
@ 2018-10-24 18:04 ` Ulrich Weigand
2018-10-26 10:37 ` Sangamesh Mallayya
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Weigand @ 2018-10-24 18:04 UTC (permalink / raw)
To: Sangamesh Mallayya; +Cc: Keith Seitz, gdb-patches
Sangamesh Mallaya wrote:
> Thanks for the review and comments.
> Attaching the changelog file and git formatted patch.
> * xcoffread.c (read_xcoff_symtab): Fix SYMBOL_LANGUAGE assertion
> failure.
GNU coding style is to mention in the ChangeLog *what* was changed,
not why the change is done. "Fix assertion failure" doesn't describe
*what* actually was changed, so it should read more like this:
* xcoffread.c (read_xcoff_symtab): Pass deduced language to
symtab_start instead of always using language_unknown.
(You can and should still describe the reason for the change, e.g. that
it fixes an assertion failure, in the git commit message.)
You should have git commit access yourself now, right? Feel free to
commit the change now. (If you don't have access, please let me know.)
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] SYMBOL_LANGUAGE assertion failure on AIX
2018-10-24 18:04 ` Ulrich Weigand
@ 2018-10-26 10:37 ` Sangamesh Mallayya
0 siblings, 0 replies; 5+ messages in thread
From: Sangamesh Mallayya @ 2018-10-26 10:37 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches, Keith Seitz
Hi Ulrich,
Thanks for the help.
I am able to commit the changes
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=b971899198607b844f5a37e39dc561766c3b331a
Thanks,
Sangamesh
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: Sangamesh Mallayya/India/IBM@IBMIN
Cc: keiths@redhat.com (Keith Seitz), gdb-patches@sourceware.org
Date: 10/24/2018 11:34 PM
Subject: Re: [PATCH] SYMBOL_LANGUAGE assertion failure on AIX
Sangamesh Mallaya wrote:
> Thanks for the review and comments.
> Attaching the changelog file and git formatted patch.
> * xcoffread.c (read_xcoff_symtab): Fix SYMBOL_LANGUAGE
assertion
> failure.
GNU coding style is to mention in the ChangeLog *what* was changed,
not why the change is done. "Fix assertion failure" doesn't describe
*what* actually was changed, so it should read more like this:
* xcoffread.c (read_xcoff_symtab): Pass deduced language
to
symtab_start instead of always using language_unknown.
(You can and should still describe the reason for the change, e.g. that
it fixes an assertion failure, in the git commit message.)
You should have git commit access yourself now, right? Feel free to
commit the change now. (If you don't have access, please let me know.)
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-26 10:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 12:56 SYMBOL_LANGUAGE assertion failure on AIX Sangamesh Mallayya
2018-10-18 15:16 ` Ulrich Weigand
2018-10-23 12:09 ` [PATCH] " Sangamesh Mallayya
2018-10-24 18:04 ` Ulrich Weigand
2018-10-26 10:37 ` Sangamesh Mallayya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).