Howard Hinnant
b162939c1a
tip-of-trunk clang has corrected some access checks for special members in a virtual inheritance hierarchy. Change a few private inheritances to protected. This change will not impact what the test was testing. This fixes http://llvm.org/bugs/show_bug.cgi?id=16753 .
...
llvm-svn: 187429
2013-07-30 19:00:45 +00:00
Howard Hinnant
04c4cffbe1
I had a buffer mismanagement bug in the demangler.
...
llvm-svn: 187255
2013-07-26 22:14:53 +00:00
Howard Hinnant
ef93bc1c8a
Updated CREDITS.TXT
...
llvm-svn: 185464
2013-07-02 19:01:59 +00:00
Howard Hinnant
60c16eb7f5
I'd no sooner made the last commit when Matthew Dempsky sent me another test case that led me to yet another closely related test case that the current design could not handle. I've now changed the way forward references are handled completely. It wasn't that much code to change. The demangler, when confronted with a forward reference to a template parameter, now parses things twice. During the second parse, all forward references are remembered from the first parse. Test suite updated with new case.
...
llvm-svn: 184672
2013-06-23 19:52:45 +00:00
Howard Hinnant
cde9e006d8
After a private conversation with Arthur O'Dwyer, and a good night's sleep, I believe this fix is a better fix than what I committed in r184656 yesterday. I've basically moved the checking for '`' from the start of the demangling process to the end of it. In the process I discovered that one of the test cases no longer demangled to the expected string. After further investigation I believe this case to not be a valid mangled string, and so I moved the test case to the 'invalid cases'. The reason I believe it is invalid is that it should use T_ instead of T0_ to index the template parameter.
...
llvm-svn: 184668
2013-06-23 17:14:35 +00:00
Howard Hinnant
ae10f9d45e
Filter out '`' in mangled strings and reject them as invalid if found.
...
llvm-svn: 184656
2013-06-23 03:36:38 +00:00
Howard Hinnant
72a54eab35
I created a random mangled name generator and have thrown about 200 million random strings at the demangler. I succeeded in crashing it twice more and those crashers have been fixed and the test suite updated with the crash cases.
...
llvm-svn: 184562
2013-06-21 17:04:24 +00:00
Howard Hinnant
8935442538
Another demangler crasher. Updated test suite to prevent regression.
...
llvm-svn: 184477
2013-06-20 21:49:34 +00:00
Howard Hinnant
763e591461
Protect against invalid mangled names. Add test suite for invalid mangled names.
...
llvm-svn: 184394
2013-06-20 01:55:07 +00:00
Howard Hinnant
b076753454
Demangle objc mangling implemented in r184250
...
llvm-svn: 184301
2013-06-19 13:43:18 +00:00
Howard Hinnant
80fe668394
Tweaks/cleanups provided by Matthew Dempsky
...
llvm-svn: 184118
2013-06-17 20:25:21 +00:00
Howard Hinnant
862c4a06ee
Demangler update: This now demangles many more (all?) C++11 symbols. Demangler tests updated.
...
llvm-svn: 184097
2013-06-17 18:10:34 +00:00
Howard Hinnant
f2ca35cd79
Add capability to demangle invocation functions for ObjC blocks.
...
llvm-svn: 179208
2013-04-10 19:44:03 +00:00
Howard Hinnant
be2eced483
Bruce Mitchener: Typo fixes.
...
llvm-svn: 175275
2013-02-15 15:48:49 +00:00
Howard Hinnant
2b853bf65f
Partially revert r152770. That commit moved the default handlers to their own file. But it also did some refactoring. It is the latter that is being reverted. The refactoring had accidentally removed the required effect that the default unexpected_handler calls std::terminate(), which is a visible effect.
...
llvm-svn: 174532
2013-02-06 19:29:55 +00:00
NAKAMURA Takumi
43632a26a5
Update the copyright coredits -- Happy new year 2013!
...
llvm-svn: 171342
2013-01-01 10:00:19 +00:00
Daniel Malea
f32048d26b
Rename class __lambda_node to ___lambda_node to fix compile failure with gcc 4.6 and 4.7
...
- using "__lambda_node" causes internal compiler error in newer GCC versions
llvm-svn: 169402
2012-12-05 18:55:49 +00:00
Howard Hinnant
c1c87c15f2
__list::ends_with_template was giving the wrong answer for empty lists. And __parse_unnamed_type_name wasn't properly handling the list of paramters and was not safe against incorrectly mangled lambdas (running past last).
...
llvm-svn: 169022
2012-11-30 18:43:50 +00:00
Howard Hinnant
7166bff4ff
Remove aborts under __dynamic_cast which were under _LIBCXX_DYNAMIC_FALLBACK. Change all type_info comparisons to use an inlined is_equal helper. However no change in functionality for this latter change at this time. This is just to encapsulate the comparison and make it a little easier to switch back and forth for testing/debugging.
...
llvm-svn: 168052
2012-11-15 18:00:42 +00:00
Howard Hinnant
fe4d464f52
Update CREDIT.TXT
...
llvm-svn: 167847
2012-11-13 15:57:18 +00:00
Howard Hinnant
70abebed37
Wen-Han Gu: Fix for http://llvm.org/bugs/show_bug.cgi?id=14312 Exception Table out-of-range but still keep walking.
...
llvm-svn: 167733
2012-11-12 18:19:15 +00:00
Howard Hinnant
c33e98ca05
Make the type_info for __shim_type_info visible. This should address some failing dynamic_casts that a few applications are doing on the type_info hierarchy.
...
llvm-svn: 165883
2012-10-13 18:45:59 +00:00
Micah Villmow
fb89f27a8f
Move TargetData to DataLayout.
...
llvm-svn: 165397
2012-10-08 16:29:26 +00:00
Howard Hinnant
538fe8f35b
Set up code under _LIBCXX_DYNAMIC_FALLBACK which is off by default. For a full description of _LIBCXX_DYNAMIC_FALLBACK, see src/private_typeinfo.cpp.
...
llvm-svn: 164863
2012-09-28 22:43:50 +00:00
Howard Hinnant
785a8721d2
Improve the diagnostic messages on dynamic_cast.
...
llvm-svn: 164833
2012-09-28 17:58:48 +00:00
Howard Hinnant
2d0352cbf8
Two changes: 1) I still didn't have the ABI correct to match the gcc-4.2 std::string under the exception classes. I think the changes to stdexcept.cpp have got that down now. 2) On Apple platforms I'm seeing visibility bugs in applications with respect to type_info's being hidden. This is causing dynamic_cast to malfunction because there are multiple type_info's running around for one type within an application, making dynamic_cast believe that one type is actually multiple types. As a stop gap measure I'm trying to detect this error, print out an error message, but continue with the most likely desired result. This is all under __APPLE__. This behavior can be expanded to other platforms if desired.
...
llvm-svn: 164809
2012-09-28 00:05:34 +00:00
Marshall Clow
8493cad160
Updating email address
...
llvm-svn: 164490
2012-09-24 14:27:24 +00:00
Howard Hinnant
128ec49e29
Rename class __lambda to __lambda_node to avoid clash with gcc. This fixes http://llvm.org/bugs/show_bug.cgi?id=13889
...
llvm-svn: 164405
2012-09-21 19:21:37 +00:00
Howard Hinnant
ed3d690f68
Tweak use of dlopen to be a little more correct and higher performing.
...
llvm-svn: 164404
2012-09-21 19:12:56 +00:00
Howard Hinnant
e115af2777
I've added Apple-only behavior that looks for libstdc++ in the same process and if found, checks the string stored in <stdexcept> exception objects to see if it is the gcc empty string singleton before manipulating the reference count. This is done so that if such an exception is created with a zero-length string in libstdc++, libc++abi won't try to delete the memory. This is part of a ongoing process to make libc++ exceptions ABI-compatible with libstdc++-4.2 exceptions, to the point that each library can catch exceptions thrown by the other. If other parties would also like this behavior, the #if __APPLE__ can be broadened.
...
llvm-svn: 164170
2012-09-18 21:34:12 +00:00
Howard Hinnant
6aa048efc9
Specifically disallow primary-expressions of the form LT_... on the basis of this decition: http://sourcerytools.com/pipermail/cxx-abi-dev/2011-August/002422.html . Failure to disallow this was causing infinite recursion in the demangler when these symbols show up due to mangling bugs. This patch causes the demangler to return an invalid mangled name result rather than crash in infinite recursion.
...
llvm-svn: 163859
2012-09-13 23:49:59 +00:00
Howard Hinnant
2c2b55f27f
Change size of reference count field in __libcpp_nmstr from 32 bits to 64 bits for 64 bit targets. This is controls the data layout of all exceptions defined in <stdexcept>. This aligns the ABI with that of gcc-4.2.
...
llvm-svn: 161496
2012-08-08 16:15:16 +00:00
Howard Hinnant
757640b156
Fixes apple: #12020687 . This was a problem in the demangler with template
...
substitution forward references. That is, sometimes a mangled name refers to
a substitution that hasn't yet been defined. The demangler was derferencing a
null pointer in this case because it wasn't properly guarded against a
forward reference. Test case added to catch this problem.
llvm-svn: 161267
2012-08-03 22:02:07 +00:00
Howard Hinnant
3a86b142a1
Update status.
...
llvm-svn: 161221
2012-08-02 22:06:41 +00:00
Howard Hinnant
fdfcfcf670
Update CREDITS.TXT
...
llvm-svn: 161129
2012-08-01 19:24:04 +00:00
Howard Hinnant
b2a9cee678
Erik Olofsson: This patch adds support for lambda demangling. I fixed this because it crashed lldb when it tried to demangle the added test.
...
Not sure how it should identify the lambda so that might need changing from the current 'lambdax':: Howard: Please patch CREDITS.TXT.
llvm-svn: 161125
2012-08-01 18:56:46 +00:00
Howard Hinnant
a8c5d770f9
Andrew Morrow: Mainline clang seems to have recently become more strict about the
...
consistent application of visibility attributes, which causes some new
breakage in libcxxabi:
In file included from src/libcxxabi/src/cxa_default_handlers.cpp:19:
src/libcxxabi/src/private_typeinfo.h:123:23: error: visibility does
not match previous declaration
class __attribute__ ((__visibility__(default))) __class_type_info
^
src/libcxxabi/src/private_typeinfo.h:19:13: note: previous attribute is here
#pragma GCC visibility push(hidden)
^
1 error generated.
The forward declaration of __class_type_info is picking up hidden
visibility from the #pragma, which conflicts with the default
visibility applied when the class is later fully declared. I'm
assuming that the full declaration has it right (and that the
diagnostic is correct), so the attached patch applies the default
visibility attribute to the forward declaration.
llvm-svn: 160933
2012-07-29 20:41:19 +00:00
Howard Hinnant
95d917f8ee
Andrew Morrow: The variable 't1' on line 10188 of cxa_demangle.cpp is uninitialized
...
which generates -Wsometimes-uninitialized. Howard: The only thing this patch is missing is an update to CREDITS.TXT.
llvm-svn: 160932
2012-07-29 16:14:52 +00:00
Sylvestre Ledru
0527b8f942
add a link to the libc++ website
...
llvm-svn: 160553
2012-07-20 17:21:42 +00:00
Richard Smith
4c50ea27bf
Add missing #include <stdlib.h> into test which uses ::exit.
...
llvm-svn: 160039
2012-07-11 09:37:56 +00:00
Howard Hinnant
7f53a5da57
Don't dereference root in __parse_ctor_dtor_name unless it is known to not be null.
...
llvm-svn: 158556
2012-06-15 21:57:51 +00:00
Howard Hinnant
ba2e8aeda5
Fix bug in cxa_demangle involving template substitution.
...
llvm-svn: 155994
2012-05-02 15:38:11 +00:00
Howard Hinnant
9de0b35648
Make __cxa_new_handler un-mangled
...
llvm-svn: 155763
2012-04-28 16:46:04 +00:00
Howard Hinnant
2a9c509c7e
Changed 'cause' from 'terminate' to 'uncaught' in default_terminate_handler
...
llvm-svn: 155452
2012-04-24 17:41:51 +00:00
Howard Hinnant
b54f86aa9d
Richard Smith: __int128 is a GNU keyword which clang 3.1 supports. This usage of it as an identifier will need to be renamed.
...
llvm-svn: 155044
2012-04-18 20:55:06 +00:00
Howard Hinnant
e59dbd7b82
I would really like to write the handlers in terms of C++11 atomics. This would give us the best performance, portablity, and safety tradeoff. Unfortunately I can not yet do that. So I've put the desired code in comments, and reverted the handler getters to the slower but safer legacy atomic intrinsics.
...
llvm-svn: 153041
2012-03-19 16:56:51 +00:00
Howard Hinnant
4ac72dd982
I've moved __cxa_terminate_handler, __cxa_unexpected_handler and __cxa_new_handler from the public header cxxabi.h into the private header cxa_handlers.hpp. During this move I've also moved them from namespace __cxxabiapple into the global namespace. They are, and have always been extern C and so the namespace (or lack of it) does not affect their ABI. In general external clients should not reference these symbols. They are atomic variables and will be changing into C++11 atomic variables in the future. However for those few clients who really need access to them, their name, mangling, size, alignment and layout will remain stable. You just may need your own declaration of them. Include guards have been added to the private header cxa_exception.hpp. The private header cxa_default_handlers.hpp has been removed and the default handlers are now file-static. Include guards have been added to the private header cxa_handlers.hpp.
...
llvm-svn: 153039
2012-03-19 16:20:34 +00:00
Howard Hinnant
0f73197364
Arm fixes in cxa_personality.cpp and a little refactoring.
...
llvm-svn: 152966
2012-03-17 00:10:52 +00:00
Dave Zarzycki
d6533ccd48
Less lame "concurrency" support
...
These APIs aren't thread safe, but they're pretending to be. Let's at
least make the getter as fast as they can be. The setters are a lost
cause unless the API can be fixed.
llvm-svn: 152786
2012-03-15 08:58:08 +00:00
Dave Zarzycki
13e35c086c
Be friendly to when dead_strip doesn't work
...
Apple Radar: 11053417
llvm-svn: 152785
2012-03-15 08:58:06 +00:00