Join GitHub today
GitHub is home to over 40 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.