| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a copy of the demangler in libcxxabi.
The code also has no dependencies on anything else in LLVM. To enforce
that I added it as another library. That way a BUILD_SHARED_LIBS will
fail if anyone adds an use of StringRef for example.
The no llvm dependency combined with the fact that this has to build
on linux, OS X and Windows required a few changes to the code. In
particular:
No constexpr.
No alignas
On OS X at least this library has only one global symbol:
__ZN4llvm16itanium_demangleEPKcPcPmPi
My current plan is:
Commit something like this
Change lld to use it
Change lldb to use it as the fallback
Add a few #ifdefs so that exactly the same file can be used in
libcxxabi to export abi::__cxa_demangle.
Once the fast demangler in lldb can handle any names this
implementation can be replaced with it and we will have the one true
demangler.
llvm-svn: 280732
|
|
|
|
|
|
| |
is flagged by LSan at least among leak detectors.
llvm-svn: 279605
|
|
|
|
|
|
|
|
| |
sufficient in some cases; increase to 64KB, which should be enough for anyone :)
Patch by github.com/bryant!
llvm-svn: 279599
|
|
|
|
|
|
|
|
|
| |
If the result of the find is only used to compare against end(), just
use is_contained instead.
No functionality change is intended.
llvm-svn: 278469
|
|
|
|
|
|
|
| |
looking for it along $PATH. This allows installs of LLVM tools outside of
$PATH to find the symbolizer and produce pretty backtraces if they crash.
llvm-svn: 272232
|
|
|
|
| |
llvm-svn: 270674
|
|
|
|
| |
llvm-svn: 270670
|
|
|
|
|
|
| |
Patch by Jeremy Huddleston Sequoia
llvm-svn: 270643
|
|
|
|
|
|
|
| |
backtraces from the signal handler on stack overflow now work reliably (on my
system at least...).
llvm-svn: 270395
|
|
|
|
| |
llvm-svn: 270299
|
|
|
|
|
|
| |
is what I get for trusting my system's man pages I suppose.
llvm-svn: 270280
|
|
|
|
|
|
| |
systems provide a <signal.h> that doesn't declare it.
llvm-svn: 270278
|
|
|
|
|
|
|
|
|
| |
the C standard library implementation in use.
This works around a glibc bug in the backtrace() function where it fails to
produce a backtrace on x86_64 if libgcc / libunwind is statically linked.
llvm-svn: 270276
|
|
|
|
|
|
| |
likely fail to produce a backtrace if we crash due to stack overflow.
llvm-svn: 270273
|
|
|
|
|
|
|
|
|
| |
This commit has been breaking the FreeBSD bots:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd
This reverts commit r269992.
llvm-svn: 270267
|
|
|
|
|
|
|
|
|
|
|
|
| |
- glibc is dynamically linked, and
- libgcc_s is unavailable (for instance, another library is being used to
provide the compiler runtime or libgcc is statically linked), and
- the target is x86_64.
If we run backtrace() and it fails to find any stack frames, try using
_Unwind_Backtrace instead if available.
llvm-svn: 269992
|
|
|
|
|
|
|
|
|
|
| |
files; other minor fixes."
This reverts commit r265454 since it broke the build. E.g.:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/
llvm-svn: 265459
|
|
|
|
|
|
|
|
|
|
|
|
| |
other minor fixes.
Some Include What You Use suggestions were used too.
Use anonymous namespaces in source files.
Differential revision: http://reviews.llvm.org/D18778
llvm-svn: 265454
|
|
|
|
| |
llvm-svn: 254380
|
|
|
|
|
|
|
| |
This avoids the need to have two dummy implementations of
findModulesAndOffsets.
llvm-svn: 252531
|
|
|
|
|
|
|
| |
llvm/lib/Support/Signals.cpp:66:13: warning: unused function 'printSymbolizedStackTrace' [-Wunused-function]
llvm/lib/Support/Signals.cpp:52:13: warning: function 'findModulesAndOffsets' has internal linkage but is not defined [-Wundefined-internal]
llvm-svn: 252418
|
|
|
|
|
| |
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 252137
|
|
|
|
|
| |
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 252136
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
llvm-symbolizer understands both PDBs and DWARF, so it is more likely to
succeed at symbolization. If llvm-symbolizer is unavailable, we will
fall back to dbghelp. This also makes our crash traces more similar
between Windows and Linux.
Reviewers: Bigcheese, zturner, chapuni
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12884
llvm-svn: 252118
|
|
|
|
|
|
|
|
| |
While theoratically required in pre-C++11 to avoid re-allocation upon call,
C++11 guarantees that c_str() returns a pointer to the internal array so
pre-calling c_str() is no longer required.
llvm-svn: 242983
|
|
|
|
|
|
|
|
|
|
|
|
| |
And expose it in Signals.h, allowing clients to call it directly,
possibly LLVMErrorHandler which currently calls RunInterruptHandlers
but not RunSignalHandlers, thus for example not printing the stack
backtrace on Unixish OSes. On Windows it does happen because
RunInterruptHandlers ends up calling the callbacks as well via
Cleanup(). This difference in behaviour and code structures in
*/Signals.inc should be patched in the future.
llvm-svn: 242936
|
|
|
|
|
|
|
|
|
| |
Move CallBacksToRun into the common Signals.cpp, create RunCallBacksToRun()
and use these in both Unix/Signals.inc and Windows/Signals.inc.
Lots of potential code to be merged here.
llvm-svn: 242925
|
|
|
|
| |
llvm-svn: 242920
|
|
|
|
| |
llvm-svn: 236768
|
|
|
|
|
|
|
|
|
| |
Fix two other variables that might cause the same hang fixed in r235914.
The hang is caused by constructing ManagedStatic in signalhandler. In
this case, if FileToRemove or CallBacksToRun is not contructed, it means
there is no work to do.
llvm-svn: 236741
|
|
|
|
|
|
| |
We need to dereference the signals mutex during handler registration so that we force its construction. This is to prevent the first use being during handling an actual signal because you can't safely allocate memory in a signal handler.
llvm-svn: 235914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current crash reporting on Mac OS is only disabled via an environment variable.
This adds a boolean (default false) which can also disable crash reporting.
The only client right now is the unittests which don't ever want crash reporting, but do want to detect killed programs.
Reduces the time to run the APFloat unittests on my machine from
[----------] 47 tests from APFloatTest (51250 ms total)
to
[----------] 47 tests from APFloatTest (765 ms total)
Reviewed by Reid Kleckner and Justin Bogner
llvm-svn: 234353
|
|
|
|
|
|
|
|
|
|
| |
This will be followed by a change on the clang side to update
the only user of this function with the new version.
Differential Revision: http://reviews.llvm.org/D8074
Reviewed By: Reid Kleckner
llvm-svn: 231392
|
|
|
|
| |
llvm-svn: 227470
|
|
|
|
| |
llvm-svn: 221258
|
|
|
|
| |
llvm-svn: 220412
|
|
|
|
|
|
| |
to (defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)). [-Wunused-function]
llvm-svn: 219596
|
|
|
|
|
|
|
| |
that guard its usage. Without this, we can get unused function warnings
when backtraces are disabled.
llvm-svn: 219558
|
|
|
|
|
|
|
|
|
|
| |
1) Explicitly provide important arguments to llvm-symbolizer,
not relying on defaults.
2) Be more defensive about symbolizer output.
This might fix weird failures on ninja-x64-msvc-RA-centos6 buildbot.
llvm-svn: 219541
|
|
|
|
|
|
|
|
|
|
|
|
| |
In fact, symbolization is now expected to work only on Linux and
FreeBSD/NetBSD, where we have dl_iterate_phdr and can learn the
main executable name without argv0 (it will be possible on BSD systems
after http://reviews.llvm.org/D5693 lands). #ifdef-out the code for
all the rest Unix systems.
Reviewed in http://reviews.llvm.org/D5610
llvm-svn: 219534
|
|
|
|
| |
llvm-svn: 219355
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change modifies fatal signal handler used in LLVM tools.
Now it attempts to find llvm-symbolizer binary and communicates
with it in order to turn instruction addresses into
function/file/line info entries. This should significantly improve
stack traces readability in Debug builds.
This feature only works on selected platforms (including Darwin
and Linux). If the symbolization fails for some reason, signal
handler will fallback to the original behavior.
Reviewed in http://reviews.llvm.org/D5610
llvm-svn: 219354
|
|
|
|
| |
llvm-svn: 216996
|
|
|
|
|
|
| |
Reviewed by: Chandlerc
llvm-svn: 216704
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on the STL class of the same name, it guards a mutex
while also allowing it to be unlocked conditionally before
destruction.
This eliminates the last naked usages of mutexes in LLVM and
clang.
It also uncovered and fixed a bug in callExternalFunction()
when compiled without USE_LIBFFI, where the mutex would never
be unlocked if the end of the function was reached.
llvm-svn: 216338
|
|
|
|
|
|
| |
Use lock/unlock() convention instead of acquire/release().
llvm-svn: 216336
|
|
|
|
|
|
|
| |
Only one function remains a bit too complicated
for a simple mutex guard. No functionality change.
llvm-svn: 216335
|
|
|
|
| |
llvm-svn: 207394
|
|
|
|
|
|
| |
While there make array_lengthof constexpr if we have support for it.
llvm-svn: 206112
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We do some nasty things w.r.t. installing or overriding signal handlers in
order to improve our crash recovery support or interaction with crash
reporting software, and those things are not necessarily appropriate when
LLVM is being linked into a client application that has its own ideas about
how to do things. This gives those clients a way to disable that handling at
build time.
- Currently, the code this guards is all Apple specific, but other platforms
might have the same concerns so I went for a more generic configure
name. Someone who is more familiar with library embedding on Windows can
handle choosing which of the Windows/Signals.inc behaviors might make sense
to go under this flag.
- This also fixes the proper autoconf'ing of ENABLE_BACKTRACES. The code
expects it to be undefined when disabled, but the autoconf check was just
defining it to 0.
llvm-svn: 189694
|