Skip to content

[NFC][compiler-rt] Add missing header include #113951

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

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented Oct 28, 2024

Include cstdlib which was originally included transitively but the
changes to vector in libcpp breaks new builds due to missing cstdlib
header for abort() function call.

Include `cstdlib` which was originally included transitively but the
changes to `vector` in libcpp breaks new builds due to missing cstdlib
header for `abort()` function call.
@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Prabhuk (Prabhuk)

Changes

Include cstdlib which was originally included transitively but the
changes to vector in libcpp breaks new builds due to missing cstdlib
header for abort() function call.


Full diff: https://github.com/llvm/llvm-project/pull/113951.diff

1 Files Affected:

  • (modified) compiler-rt/include/fuzzer/FuzzedDataProvider.h (+1)
diff --git a/compiler-rt/include/fuzzer/FuzzedDataProvider.h b/compiler-rt/include/fuzzer/FuzzedDataProvider.h
index 5903ed837917ca..e57b95b6304a9a 100644
--- a/compiler-rt/include/fuzzer/FuzzedDataProvider.h
+++ b/compiler-rt/include/fuzzer/FuzzedDataProvider.h
@@ -18,6 +18,7 @@
 #include <climits>
 #include <cstddef>
 #include <cstdint>
+#include <cstdlib>
 #include <cstring>
 #include <initializer_list>
 #include <limits>

@Prabhuk Prabhuk merged commit 9f69da3 into llvm:main Oct 28, 2024
9 of 10 checks passed
@Prabhuk Prabhuk deleted the upstream_main branch October 28, 2024 22:24
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
Include `cstdlib` which was originally included transitively but the
changes to `vector` in libcpp breaks new builds due to missing cstdlib
header for `abort()` function call.
nico added a commit that referenced this pull request Nov 5, 2024
It was originally included transitively, but no longer is after recent
<vector> cleanups in libc++.

Similar to #113951.
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 14, 2024
Bug: 376278210
Change-Id: Iaca8a195f6d04ff6c85b556ebe720bab74141255
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6017144
Auto-Submit: Nico Weber <[email protected]>
Reviewed-by: Hans Wennborg <[email protected]>
Commit-Queue: Hans Wennborg <[email protected]>
Commit-Queue: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1382797}
phuang pushed a commit to phuang/llvm-project that referenced this pull request Nov 30, 2024
Include `cstdlib` which was originally included transitively but the
changes to `vector` in libcpp breaks new builds due to missing cstdlib
header for `abort()` function call.
fanquake added a commit to fanquake/bitcoin that referenced this pull request Dec 9, 2024
Same as llvm/llvm-project#113951.

Avoids compile failures under clang-20 &
`D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`:
```bash
In file included from /bitcoin/src/test/fuzz/addition_overflow.cpp:5:
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:209:5: error: use of undeclared identifier 'abort'
  209 |     abort();
      |     ^
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:250:5: error: use of undeclared identifier 'abort'
  250 |     abort();
```
fanquake added a commit to bitcoin/bitcoin that referenced this pull request Dec 10, 2024
bb7e686 fuzz: add cstdlib to FuzzedDataProvider (fanquake)

Pull request description:

  Same as llvm/llvm-project#113951.

  Avoids compile failures under clang-20 & `D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`:
  ```bash
  In file included from /bitcoin/src/test/fuzz/addition_overflow.cpp:5:
  /bitcoin/src/test/fuzz/FuzzedDataProvider.h:209:5: error: use of undeclared identifier 'abort'
    209 |     abort();
        |     ^
  /bitcoin/src/test/fuzz/FuzzedDataProvider.h:250:5: error: use of undeclared identifier 'abort'
    250 |     abort();
  ```

ACKs for top commit:
  dergoegge:
    utACK bb7e686
  brunoerg:
    ACK bb7e686

Tree-SHA512: 22efd5505273ec7254e8dccbb275e648fe02107397c45eff6752e4a6ea787d9d2e45eb0f2ee309df431e9b92ffd14cbcba4b0f4b11a127664466e20be43c383e
achow101 pushed a commit to achow101/bitcoin that referenced this pull request Dec 11, 2024
Same as llvm/llvm-project#113951.

Avoids compile failures under clang-20 &
`D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`:
```bash
In file included from /bitcoin/src/test/fuzz/addition_overflow.cpp:5:
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:209:5: error: use of undeclared identifier 'abort'
  209 |     abort();
      |     ^
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:250:5: error: use of undeclared identifier 'abort'
  250 |     abort();
```

Github-Pull: bitcoin#31448
Rebased-From: bb7e686
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Jan 19, 2025
Same as llvm/llvm-project#113951.

Avoids compile failures under clang-20 &
`D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`:
```bash
In file included from /bitcoin/src/test/fuzz/addition_overflow.cpp:5:
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:209:5: error: use of undeclared identifier 'abort'
  209 |     abort();
      |     ^
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:250:5: error: use of undeclared identifier 'abort'
  250 |     abort();
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants