Skip to content

DataFlowSanitizer-x86_64 :: custom.cpp: undefined reference to `__isoc23_strtol.dfsan' (and more) #79283

Closed
@mgorny

Description

@mgorny
Member

I'm seeing the following test regression. I haven't bisected it but I suspect it started with 67e0f41 when the test was un-XFAILed. I've reproduced it with 9eb0f86 (Saturday morning) and 543cf08 (today):

FAIL: DataFlowSanitizer-x86_64 :: custom.cpp (2172 of 7003)
******************** TEST 'DataFlowSanitizer-x86_64 :: custom.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt_build/lib/llvm/19/bin/clang  -fsanitize=dataflow  -m64  /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp -o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt_build/test/dfsan/X86_64Config/Output/custom.cpp.tmp && DFSAN_OPTIONS="strict_data_dependencies=0"  /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt_build/test/dfsan/X86_64Config/Output/custom.cpp.tmp
+ /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt_build/lib/llvm/19/bin/clang -fsanitize=dataflow -m64 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp -o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt_build/test/dfsan/X86_64Config/Output/custom.cpp.tmp
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp:2079:11: warning: 'snprintf' will always be truncated; specified size is 19, but format string expands to at least 26 [-Wformat-truncation]
 2079 |   int r = snprintf(buf, 19, "hello %s, %-d/   %d/%d %f", s, y, m, d,
      |           ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp:2237:31: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
 2237 |   test_sscanf_chunk((intmax_t)18446744073709551615, "%ju", _buf, 1);
      |                               ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp:2241:29: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
 2241 |   test_sscanf_chunk((size_t)18446744073709551615, "%zu", _buf, 1);
      |                             ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp:2245:32: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
 2245 |   test_sscanf_chunk((ptrdiff_t)18446744073709551615, "%tu", _buf, 1);
      |                                ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/work/compiler-rt/test/dfsan/custom.cpp:2251:38: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
 2251 |   test_sscanf_chunk((char)'z', "%c", "z", 1);
      |                                      ^
5 warnings generated.
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `test_strtol() [clone .dfsan]':
custom.cpp:(.text+0x74a5): undefined reference to `__isoc23_strtol.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x7604): undefined reference to `__isoc23_strtol.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x7725): undefined reference to `__isoc23_strtol.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `test_strtoll() [clone .dfsan]':
custom.cpp:(.text+0x7865): undefined reference to `__isoc23_strtoll.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x79c4): undefined reference to `__isoc23_strtoll.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x7ae5): undefined reference to `__isoc23_strtoll.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `test_strtoul() [clone .dfsan]':
custom.cpp:(.text+0x7c25): undefined reference to `__isoc23_strtoul.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x7d8d): undefined reference to `__isoc23_strtoul.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x7eb4): undefined reference to `__isoc23_strtoul.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `test_strtoull() [clone .dfsan]':
custom.cpp:(.text+0x8005): undefined reference to `__isoc23_strtoull.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x8160): undefined reference to `__isoc23_strtoull.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0x827e): undefined reference to `__isoc23_strtoull.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `test_sscanf() [clone .dfsan]':
custom.cpp:(.text+0xe324): undefined reference to `__isoc23_sscanf.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0xe49d): undefined reference to `__isoc23_sscanf.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: custom.cpp:(.text+0xe932): undefined reference to `__isoc23_sscanf.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `void test_sscanf_chunk<int>(int, char const*, char*, int) [clone .dfsan]':
custom.cpp:(.text._Z17test_sscanf_chunkIiEvT_PKcPci.dfsan[_Z17test_sscanf_chunkIiEvT_PKcPci]+0x325): undefined reference to `__isoc23_sscanf.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o: in function `void test_sscanf_chunk<long>(long, char const*, char*, int) [clone .dfsan]':
custom.cpp:(.text._Z17test_sscanf_chunkIlEvT_PKcPci.dfsan[_Z17test_sscanf_chunkIlEvT_PKcPci]+0x326): undefined reference to `__isoc23_sscanf.dfsan'
/usr/bin/x86_64-pc-linux-gnu-ld: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-19.0.0.9999/temp/custom-2d641b.o:custom.cpp:(.text._Z17test_sscanf_chunkIcEvT_PKcPci.dfsan[_Z17test_sscanf_chunkIcEvT_PKcPci]+0x324): more undefined references to `__isoc23_sscanf.dfsan' follow
clang: error: linker command failed with exit code 1 (use -v to see invocation)

--

********************

This is Gentoo amd64, glibc 2.38-r9.

CC @MaskRay

Activity

added this to the LLVM 18.0.X Release milestone on Jan 24, 2024
thesamesam

thesamesam commented on Jan 24, 2024

@thesamesam
Member
moved this from Needs Triage to Needs Fix in LLVM Release Statuson Jan 26, 2024
added a commit that references this issue on Jan 30, 2024
6485600
MaskRay

MaskRay commented on Jan 30, 2024

@MaskRay
Member

/cherry-pick 6485600

added a commit that references this issue on Jan 30, 2024
ebe024a
llvmbot

llvmbot commented on Jan 30, 2024

@llvmbot
Member

/pull-request #80068

tstellar

tstellar commented on Feb 7, 2024

@tstellar
Collaborator

PR has been created, we will track status there.

added a commit that references this issue on Feb 9, 2024
e6fa3ff
added 3 commits that reference this issue on Feb 14, 2024
054d5cd
3578f6a
ef30f4c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

      Development

      Participants

      @mgorny@tstellar@MaskRay@EugeneZelenko@thesamesam

      Issue actions

        DataFlowSanitizer-x86_64 :: custom.cpp: undefined reference to `__isoc23_strtol.dfsan' (and more) · Issue #79283 · llvm/llvm-project