Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
test: fixedbugs/issue30908.go failing on Plan 9 #31503
CL 168957 added
Does anyone know why
The intent of -strictdups was to catch problems with generation of DWARF for inlined functions.
Suppose we have package "abc" that exports inlineable "abc.Foo". Let's say that this function is inlined into packages "c" and "d".
At link time, the linker will see multiple copies of certain DWARF sections for "abc.Foo", one from the original version in "abc", then two more from the copies of the function that were in used in "c" and "d". The linker will then simply discard all but the first copy. If the other copies are actually distinct from the first copy, however this can result in corrupted DWARF (as in the bug #30908).
The -strictdups option was intended to be a way to programmatically check for cases where we have different DWARF being generated for the same function depending on the context in which it was compiled.
Unfortunately -strictdups has problems with wrapper functions and with builtins (like builtin.error.Error) which seem to sometimes be given source positions based on where they are used (as opposed some other canonical pos).
Probably the right thing to do is to adjust the whitelist -- I will send a CL.
Add a couple of additional entries to the white list used to screen out errors for builtin functions; these correspond to cases that appear to come up only on the plan9 builder. Updates #31503. Change-Id: I48ab942ab2894240efe651ec7b7eace7aa5cb45e Reviewed-on: https://go-review.googlesource.com/c/go/+/172986 Reviewed-by: David du Colombier <firstname.lastname@example.org> Reviewed-by: Ian Lance Taylor <email@example.com> Run-TryBot: Than McIntosh <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>