Fix copyright lines Summary: [Folly] Fix copyright lines based on file histories. Reviewed By: spalamarchuk Differential Revision: D6720312 fbshipit-source-id: c70a667a1977e70e2d4451ea624f96163982f681
Apply clang-format to folly/experimental/symbolizer/ Summary: [Folly] Apply `clang-format` to `folly/experimental/symbolizer/`. Reviewed By: Orvid Differential Revision: D5468832 fbshipit-source-id: 94a0f82312769be0e8be724c11f97e14425ead10
Enable more auto-deps in Folly Summary: This enables auto-deps support in more places in Folly. It also fixes a couple of auto-deps declarations that were missing an `s`. Reviewed By: yfeldblum Differential Revision: D5289542 fbshipit-source-id: 7d34b29bcc172fb31f91f1ba880864e2d5869ffd
Prevent a crash in folly::Symbolizer Summary: dbg and dbgo builds of hhvm with gcc-5 crash when generating backtraces using folly::Symbolizer, because the .debug_aranges for libc-2.23.so are SHF_COMPRESSED, and folly::Symbolizer doesn't recognize that. Just pretend that the section doesn't exist if it has SHF_COMPRESSED set. We might eventually want to support decompressing such sections under an option - but folly::Symbolizer's goal is to just mmap and walk the debug info without allocating memory (so that it can run while handling signals etc). Reviewed By: pixelb Differential Revision: D4586762 fbshipit-source-id: bef61ed670d1a80caa4f7aac1f80fd2a92cc4ba9
2017 Summary: [Folly] 2017. Reviewed By: Orvid Differential Revision: D4378593 fbshipit-source-id: 4a448228bb1ddbe191b6e8562483867a399be846
fall back to .debug_info scan in fatal signal handler Summary: We've found clang might be generating incomplete `.debug_aranges`, while falling back to linear `.debug_info` scan is too expensive and shouldn't be used by default, we can afford doing that in fatal signal handler. Also optimize `exception_tracer::printExceptionInfo()` to avoid `LocationInfo` resolution if `NO_FILE_AND_LINE` is used. Reviewed By: luciang, ot Differential Revision: D4020989 fbshipit-source-id: 84172208736b224c19206da48bcb3b5c0b2c67d0
fix .debug_aranges parsing Summary: Each sequence of tuples within an entires set is terminated with (0, 0) according to the DWARF standard (see 7.20 in http://www.dwarfstd.org/doc/DWARF4.pdf). Reviewed By: ot, luciang Differential Revision: D4014952 fbshipit-source-id: c4b034c94adc4a0d9b052456c02919a54a79eaf1
Find dwarf.h in libdwarf subdirectory Summary: libdwarf headers moved from `/usr/include` to `/usr/include/libdwarf` in [dwarfutils 20160613-2](http://metadata.ftp-master.debian.org/changelogs/main/d/dwarfutils/unstable_changelog). Adds a check for the library as well, and fixes a tiny typo in the `libunwind` check. No longer checks for `libdwarf.h`; only `dwarf.h` is used. Closes https://github.com/facebook/folly/pull/480 Reviewed By: yfeldblum Differential Revision: D3878961 Pulled By: Orvid fbshipit-source-id: 7970d33511bf6d351cec2c8077cb07b85f2f8d33
folly: symbolizer: dwarf: don't fallback to linear scan if address missing from .debug_aranges Summary:Presence of .debug_aranges implies user expects fast address lookup. Some addresses might not be avaialble in .debug_aranges. Don't do slow lookup in .debug_info, as it can lead to unexpected slowdowns. override-unit-failures Reviewed By: philippv Differential Revision: D2965323 fb-gh-sync-id: 405daefd57cdff4344fd231c5f5b7ff4dcd9df8c shipit-source-id: 405daefd57cdff4344fd231c5f5b7ff4dcd9df8c
folly: symbolizer: slow address->{file+line-number} lookup if `.debug_aranges` is missing (e.g. --strip-debug-non-line) Summary:Binaries linked with `gold` and `--strip-debug-non-line` don't have an `.debug_aranges` section We still want to map `address->{file+line-number}` to get nice stack traces even though this might be slower (linear search all compilation unit entries in `.debug_info`). Before: ``` $ # link with gold + --strip-debug-non-line $ folly/experimental/exception_tracer/exception_tracer_test E0217 15:02:13.694947 1321814 ExceptionTracer.cpp:179] Exception type: std::runtime_error (9 frames) @ 000000000040ad2d __cxa_throw @ 0000000000409df3 bar() @ 0000000000409eab baz() @ 0000000000407c77 main @ 00007f00dd9860f5 __libc_start_main @ 000000000040991b (unknown) ``` After (similar to the output without `--strip-debug-non-line`): ``` E0217 18:37:37.579596 1583124 ExceptionTracer.cpp:179] Exception type: std::runtime_error (9 frames) @ 000000000040ad6d __cxa_throw ./folly/experimental/exception_tracer/ExceptionTracerLib.cpp:57 @ 0000000000409e33 bar() ./folly/experimental/exception_tracer/ExceptionTracerTest.cpp:24 @ 0000000000409eeb baz() ./folly/experimental/exception_tracer/ExceptionTracerTest.cpp:51 @ 0000000000407c87 main ./folly/experimental/exception_tracer/ExceptionTracerTest.cpp:96 @ 00007f1d16ff80f5 __libc_start_main @ 000000000040995b (unknown) ``` Differential Revision: D2947965 fb-gh-sync-id: e517bab324b1dcb70cadc9a5211ce794e35c83a5 shipit-source-id: e517bab324b1dcb70cadc9a5211ce794e35c83a5
folly copyright 2015 -> copyright 2016 Summary: Update copyright for 2016 Reviewed By: igorsugak Differential Revision: D2828047 fb-gh-sync-id: 8638188aeb694c3ca2a615cc2bc3bc9d251e388d shipit-source-id: 8638188aeb694c3ca2a615cc2bc3bc9d251e388d
Copyright 2014->2015 Summary: Update copyright notices in folly to 2015 find folly/ -type f | xargs sed -i 's/Copyright 2014 Facebook, Inc./Copyright 2015 Facebook, Inc./g'find . -type f | xargs sed -i 's/Copyright 2014 Facebook, Inc./Copyright 2015 Facebook, Inc./g' Test Plan: fbconfig -r folly && fbmake runtests Reviewed By: markisaa@fb.com Subscribers: ldbrandy, shilin, sdwilsh, fugalh, njormrod, folly-diffs@, jsedgwick, yfeldblum FB internal diff: D1869183 Signature: t1:1869183:1424823514:a2dd33741a86bf099d5c9e3d8702e6cca6dd672f
Fix Dwarf path handling to fix broken test Summary: Simplify the logic slightly to better handle joining paths. This makes DwarfTest.cpp pass. Test Plan: runtests Reviewed By: njormrod@fb.com Subscribers: lins, anca, folly-diffs@ FB internal diff: D1756036 Tasks: 5871014 Signature: t1:1756036:1419359254:123cc508b8836ea0b1485abe361b1c158538aa08
Various Dwarf::Path fixes Summary: - Allow both `baseDir` and `subDir` to be empty. This can happen if DW_AT_comp_dir is `.` and gets simplified to the empty string. (The DWARF standard doesn't appear to disallow relative dirs here, but I couldn't find anthing definitive). - Fix `./` prefix stripping to avoid making paths like `.///hello` absolute. - Fix `/` suffix stripping to avoid making the root dir reference (`/`) empty. - Do `baseDir` and `subDir` swapping after simplification. Test Plan: Added unittests. Reviewed By: njormrod@fb.com Subscribers: trunkagent, sdwilsh, folly-diffs@ FB internal diff: D1747978 Signature: t1:1747978:1419014942:87f14cb31b8c19b524d7a95b14d63cf5661a8634
Fix folly lint errors Summary: Fix EOF whitespace for file in `find folly -type f` ; do if [ -z "`tail -n1 $file`" ] ; then sed -i '$d' $file ; fi ; done Test Plan: run unit tests Reviewed By: robbert@fb.com Subscribers: trunkagent, sdwilsh, njormrod, folly-diffs@ FB internal diff: D1644130 Tasks: 5486739 Signature: t1:1644130:1414715392:b6c783851aa030ad1148f84a98139a5dca207da0
Codemod: use #include angle brackets in folly and thrift Summary: Also changed the thrift compilers to emit code with <...>. Test Plan: fbconfig -r folly thrift && fbmake opt && fbmake runtests_opt Reviewed By: davejwatson@fb.com Subscribers: ruibalp, nli, shilin, tjackson, fugalh, alandau, bmatheny, njormrod FB internal diff: D1411225
Copyright 2013 -> 2014 Summary: ...and stop lint complaining at everyone. @override-unit-failures Test Plan: Inspection. Build folly. Reviewed By: delong.j@fb.com FB internal diff: D1151216
Fix name handling when baseDir and subDir are both empty, simplify paths Test Plan: fbconfig -r folly/experimental/symbolizer folly/experimental/exception_tracer && fbmake runtests_opt Reviewed By: wez@fb.com FB internal diff: D1104426
Async-signal-safe symbolizer, fatal signal handler Test Plan: test added Reviewed By: lucian@fb.com FB internal diff: D1076170 @override-unit-failures
OSX compat fixes Summary: fix OSX compat issues Github Author: Daniel Sloof <goapsychadelic@gmail.com> Test Plan: - compiled Reviewed By: pt@fb.com FB internal diff: D877309