Skip to content

[llvm-dis] Update header comment to reflect current command-line options #1

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

Closed
wants to merge 1 commit into from

Conversation

MainakSil
Copy link
Owner

Summary:
This PR updates the header comment in llvm-dis.cpp to accurately reflect the current command-line options and positional arguments supported by llvm-dis. The original comment was outdated and only mentioned the --help option, whereas several additional options have been introduced.

Changes Made:

  • Updated the comment block to include all relevant options:
    • Short options: -o, -f.
    • Long options: --disable-output, --set-importing, --show-annotations, --preserve-ll-uselistorder, --materialize-metadata, --print-thinlto-index-only.
  • Ensured that hidden options were not included in the header, as per LLVM's guidelines.

Testing:
This change only affects comments in the source code and does not impact the functionality of the tool itself. The tool has been tested to verify that no functionality is affected by this update.

Issue Reference:
This PR resolves issue llvm#108069.

- Updated the header comment in llvm-dis.cpp to accurately reflect
  the current available command-line options and positional arguments.
- Added details for:
  - Short options: -o, -f.
  - Long options: --disable-output, --set-importing, --show-annotations,
    --preserve-ll-uselistorder, --materialize-metadata, --print-thinlto-index-only.
- Ensured hidden options are excluded from the header.
@marcauberer
Copy link

Duplicate of llvm#108073

MainakSil pushed a commit that referenced this pull request Sep 16, 2024
When SPARC Asan testing is enabled by PR llvm#107405, many Linux/sparc64
tests just hang like
```
#0  0xf7ae8e90 in syscall () from /usr/lib32/libc.so.6
#1  0x701065e8 in __sanitizer::FutexWait(__sanitizer::atomic_uint32_t*, unsigned int) ()
    at compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:766
#2  0x70107c90 in Wait ()
    at compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp:35
#3  0x700f7cac in Lock ()
    at compiler-rt/lib/asan/../sanitizer_common/sanitizer_mutex.h:196
llvm#4  Lock ()
    at compiler-rt/lib/asan/../sanitizer_common/sanitizer_thread_registry.h:98
llvm#5  LockThreads ()
    at compiler-rt/lib/asan/asan_thread.cpp:489
llvm#6  0x700e9c8c in __asan::BeforeFork() ()
    at compiler-rt/lib/asan/asan_posix.cpp:157
llvm#7  0xf7ac83f4 in ?? () from /usr/lib32/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
```
It turns out that this happens in tests using `internal_fork` (e.g.
invoking `llvm-symbolizer`): unlike most other Linux targets, which use
`clone`, Linux/sparc64 has to use `__fork` instead. While `clone`
doesn't trigger `pthread_atfork` handlers, `__fork` obviously does,
causing the hang.

To avoid this, this patch disables `InstallAtForkHandler` and lets the
ASan tests run to completion.

Tested on `sparc64-unknown-linux-gnu`.
@MainakSil MainakSil closed this Sep 18, 2024
@MainakSil MainakSil deleted the Update branch September 18, 2024 15:36
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

Successfully merging this pull request may close these issues.

2 participants