Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Swiftly does not install or create symlink for llvm-symbolizer #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ADKaster opened this issue May 28, 2025 · 0 comments
Open

Swiftly does not install or create symlink for llvm-symbolizer #368

ADKaster opened this issue May 28, 2025 · 0 comments

Comments

@ADKaster
Copy link

ADKaster commented May 28, 2025

This might actually be a swift toolchain issue.

I had a difficult-to-debug ASAN test failure when using the swiftly toolchain.

It turns out that when you have Leak Sanitizer suppressions, these only get applied if the LSAN runtime can match up your patterns with the symbolized output from the LSAN stack traces.

It wasn't until I updated my host clang on my Linux box, without setting up my usual default symlinks, that I discovered that swiftly doesn't supply llvm-symbolizer.

The result looks something like this:

Failed run (symbolizer not available)

Tests/LibGfx$  ../../Build/swift/bin/TestWOFF2
Running 2 cases out of 2.
Running test 'tolerate_incorrect_sfnt_size'.
Completed test 'tolerate_incorrect_sfnt_size' in 19ms
Running test 'malformed_woff2'.
offset fail; src_offset 4294967380 length 640 dst_offset 236
Completed test 'malformed_woff2' in 1ms
Finished 2 tests and 0 benchmarks in 0ms (19ms tests, 0ms benchmarks, -19ms other).
All 2 tests passed.

=================================================================
==304189==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 6656 byte(s) in 26 object(s) allocated from:
    #0 0x568550918f9f  (/home/andrew/ladybird-org/ladybird-browser/Build/swift/bin/TestWOFF2+0x126f9f)
    #1 0x79f0e09a4b88  (/home/andrew/ladybird-org/ladybird-browser/Build/swift/vcpkg_installed/x64-linux-dynamic/lib/libfontconfig.so.1+0x3fb88)

Indirect leak of 1664 byte(s) in 52 object(s) allocated from:
    #0 0x568550919159  (/home/andrew/ladybird-org/ladybird-browser/Build/swift/bin/TestWOFF2+0x127159)
    #1 0x79f0e09a56f0  (/home/andrew/ladybird-org/ladybird-browser/Build/swift/vcpkg_installed/x64-linux-dynamic/lib/libfontconfig.so.1+0x406f0)

Indirect leak of 519 byte(s) in 50 object(s) allocated from:
    #0 0x5685508e694a  (/home/andrew/ladybird-org/ladybird-browser/Build/swift/bin/TestWOFF2+0xf494a)
    #1 0x79f0e09a4429  (/home/andrew/ladybird-org/ladybird-browser/Build/swift/vcpkg_installed/x64-linux-dynamic/lib/libfontconfig.so.1+0x3f429)

SUMMARY: AddressSanitizer: 8839 byte(s) leaked in 128 allocation(s).

Tests/LibGfx$ echo $?
1

Successful run (symbolizer path passed explicitly):

Tests/LibGfx$ ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-19 ../../Build/swift/bin/TestWOFF2
Running 2 cases out of 2.
Running test 'tolerate_incorrect_sfnt_size'.
Completed test 'tolerate_incorrect_sfnt_size' in 19ms
Running test 'malformed_woff2'.
offset fail; src_offset 4294967380 length 640 dst_offset 236
Completed test 'malformed_woff2' in 1ms
Finished 2 tests and 0 benchmarks in 0ms (18ms tests, 0ms benchmarks, -18ms other).
All 2 tests passed.
-----------------------------------------------------
Suppressions used:
  count      bytes template
     26       6656 FcPatternObjectInsertElt
-----------------------------------------------------

Tests/LibGfx$ echo $?
0

What's the best way to handle this? Where do I ask the toolchain folks to add llvm-symbolizer to the standard package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant