Skip to content

Upstream emscripten compiler-rt changes (In particular the new asan, lsan, platform support) #15097

Open

Description

@sbc100
No description provided.

Activity

  1. sbc100 commented on Jun 28, 2024

    @sbc100
    CollaboratorAuthor

    I think this is largely don't now isn't it @aheejin ?

  2. aheejin commented on Jun 28, 2024

    @aheejin
    Member

    I don't think so? At least I haven't upstreamed any compiler-rt changes myself. (I only upstreamed Wasm EH-related changes libc++abi / libunwind) Running grep on the upstream LLVM's compiler-rt directory doesn't yield much. I'm not sure what those LIBFUZZER_EMSCRIPTEN things are but they are not our sanitizer changes.

    aheejin@aheejin:~/llvm-project/compiler-rt$ grep EMSCRIPTEN * -R
    lib/orc/endianness.h:    defined(__Fuchsia__) || defined(__EMSCRIPTEN__)
    lib/fuzzer/FuzzerDriver.cpp:#if !LIBFUZZER_EMSCRIPTEN
    lib/fuzzer/FuzzerDriver.cpp:#endif // LIBFUZZER_EMSCRIPTEN
    lib/fuzzer/FuzzerExtFunctionsWeak.cpp:    LIBFUZZER_FREEBSD || LIBFUZZER_EMSCRIPTEN
    lib/fuzzer/FuzzerExtraCounters.cpp:    LIBFUZZER_FUCHSIA || LIBFUZZER_EMSCRIPTEN
    lib/fuzzer/FuzzerUtilLinux.cpp:    LIBFUZZER_EMSCRIPTEN
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 0
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 0
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 0
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 0
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 0
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 0
    lib/fuzzer/FuzzerPlatform.h:#elif __EMSCRIPTEN__
    lib/fuzzer/FuzzerPlatform.h:#define LIBFUZZER_EMSCRIPTEN 1
    lib/fuzzer/FuzzerPlatform.h:   LIBFUZZER_FREEBSD || LIBFUZZER_EMSCRIPTEN)
    lib/fuzzer/FuzzerUtilPosix.cpp:  if (Options.HandleAlrm && Options.UnitTimeoutSec > 0 && !LIBFUZZER_EMSCRIPTEN)
    lib/fuzzer/FuzzerUtilPosix.cpp:      LIBFUZZER_EMSCRIPTEN) {
  3. kleisauke commented on Jun 29, 2024

    @kleisauke
    Collaborator

    FWIW, this might be easier to do after (draft) PR #19559 lands. That is, it mostly reverts the Emscripten-specific syscall changes in sanitizer_linux.cpp in favor of libc calls in sanitizer_emscripten.cpp, similar to the NetBSD and macOS implementations.

  4. kleisauke commented on Jul 7, 2025

    @kleisauke
    Collaborator

    I've just split those changes to PR #24655.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions