- 11 Mar, 2019 1 commit
-
-
PR libbacktrace/89669 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if HAVE_ELF. * Makefile.in: Regenerate. From-SVN: r269594
Ian Lance Taylor committed
-
- 26 Feb, 2019 2 commits
-
-
With gcc 4.8.5, btest_lto ends up with a privatized name for the variable with name 'global': ... $ nm btest_lto | grep ' d ' | grep global 0000000000617150 d global.2530 ... which makes test5 fail: ... test5: unexpected syminfo name got global.2530 expected global ... Fix this failure by accepting this type of name as a valid name in btest_lto. 2019-02-26 Tom de Vries <tdevries@suse.de> * btest.c (test5): Allow global.* as minimal symbol name for global. From-SVN: r269217
Tom de Vries committed -
If dwz is not available, then the libbacktrace test b3test_dwz_buildid fails like this: ... gmake[4]: *** No rule to make target 'b3test_dwz_buildid' ... Fix this by guarding the test with HAVE_DWZ. Tested on x86_64 with and without dwz installed. 2019-02-26 Tom de Vries <tdevries@suse.de> * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ. * Makefile.in: Regenerate. From-SVN: r269204
Tom de Vries committed
-
- 12 Feb, 2019 1 commit
-
-
The call to bsearch in dwarf_lookup_pc can have NULL as base argument when the nmemb argument is 0. The base argument is required to be pointing to the initial member of an array of nmemb objects. It is not specified what constitutes a valid pointer to an array of 0 objects, but glibc declares base with attribute non-null, so the NULL will trigger a sanitizer runtime error. Fix this by only calling bsearch if nmemb != 0. 2019-02-12 Tom de Vries <tdevries@suse.de> PR libbacktrace/81983 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0. From-SVN: r268796
Tom de Vries committed
-
- 10 Feb, 2019 1 commit
-
-
Add libbacktrace test-case using -flto. 2019-02-10 Tom de Vries <tdevries@suse.de> * Makefile.am (BUILDTESTS): Add btest_lto. * Makefile.in: Regenerate. * btest.c (test1, f2, f3, test3, f22, f23): Declare with __attribute__((noclone)). From-SVN: r268736
Tom de Vries committed
-
- 08 Feb, 2019 2 commits
-
-
The backtrace functions backtrace_full, backtrace_print and backtrace_simple walk the call stack, but make sure to skip the first entry, in order to skip over the functions themselves, and start the backtrace at the caller of the functions. When compiling with -flto, the functions may be inlined, causing them to skip over the caller instead. Fix this by declaring the functions with __attribute__((noinline)). 2019-02-08 Tom de Vries <tdevries@suse.de> * backtrace.c (backtrace_full): Declare with __attribute__((noinline)). * print.c (backtrace_print): Same. * simple.c (backtrace_simple): Same. From-SVN: r268668
Tom de Vries committed -
Add handling of the DW_FORM_ref_addr encoding to libbacktrace. 2019-02-08 Tom de Vries <tdevries@suse.de> PR libbacktrace/78063 * dwarf.c (build_address_map): Keep all parsed units. (read_referenced_name_from_attr): Handle DW_FORM_ref_addr. From-SVN: r268663
Tom de Vries committed
-
- 31 Jan, 2019 1 commit
-
-
The 'debugaltlink_name_len =+ 1' bug reported in PR89136 exposes the fact that the build-id is not verified for the .gnu_debugaltlink. Fix both problems. 2019-01-31 Tom de Vries <tdevries@suse.de> PR libbacktrace/89136 * elf.c (elf_add): Read build-id if with_buildid_data. Fix 'debugaltlink_name_len =+ 1'. From-SVN: r268419
Tom de Vries committed
-
- 29 Jan, 2019 2 commits
-
-
Add test-cases b2test_buildid and b3test_dwz_buildid. The last one triggers the segfault fixed by "[backtrace] Avoid segfault" ( r268275 ). 2019-01-29 Tom de Vries <tdevries@suse.de> * install-debuginfo-for-buildid.sh.in: New script. * Makefile.am (check_PROGRAMS): Add b2test and b3test. (TESTS): Add b2test_buildid and b3test_dwz_buildid. * Makefile.in: Regenerate. * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL. (READELF): Set with AC_CHECK_PROG. (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES. * configure: Regenerate. * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ... (elf_open_debugfile_by_buildid): ... here. From-SVN: r268369
Tom de Vries committed -
In automake files, the check_PROGRAMS variable lists programs that need to be build for testing, and TESTS lists the programs that need to be run. The libbacktrace/Makefile.am uses a shortcut: ... TESTS = $(check_PROGRAMS) ... to make sure that each program added with: ... check_PROGRAMS += foo ... is both build and run. However, for the allocfail.sh test, we need allocfail to be build and allocfail.sh to be run: ... check_PROGRAMS += allocfail TESTS += allocfail.sh ... but the shortcut causes allocfail also to be run, which is not required. Fix this by removing the short-cut, allowing check_PROGRAMS to retain its original semantics, and introducing a variable BUILDTESTS for programs that need to be both build and run. 2019-01-29 Tom de Vries <tdevries@suse.de> * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for allocfail. (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS. (check_PROGRAMS): Add BUILDTESTS. * Makefile.in: Regenerate. From-SVN: r268360
Tom de Vries committed
-
- 28 Jan, 2019 1 commit
-
-
When generating xcoff_%.c, the last command is a sed command. In case of a sed failure, this will leave an incomplete file, which will appear as up to date to make, so consequently it will not be regenerated. Fix this by sedding into a temporary file instead. Also, use $< to access the prerequisite xcoff.c, instead of spelling out the file name once more. 2019-01-28 Tom de Vries <tdevries@suse.de> * Makefile.am (xcoff_%.c): Generate sed result into temporary file. Use $< to access prerequisite. * Makefile.in: Regenerate. From-SVN: r268344
Tom de Vries committed
-
- 25 Jan, 2019 3 commits
-
-
https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01521.html * elf.c (elf_add): Pass "" filename to recursive call with separated debug. From-SVN: r268275
Nathan Sidwell committed -
Currently, when running a libbacktrace testcase t with .gnu_debuglink to t.debug, and t.debug having a .gnu_debugaltlink to t.alt.debug, a segfault is triggered when calling strrchr with a NULL string from elf_find_debugfile_by_debuglink. The NULL string originates from the elf_add called for the .gnu_debugaltlink, which uses NULL as filename argument. Fix this by using "" as filename argument instead. 2019-01-25 Tom de Vries <tdevries@suse.de> * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with filename == "". * Makefile.am (TESTS): Add btest_dwz_gnudebuglink. * Makefile.in: Regenerate. From-SVN: r268269
Tom de Vries committed -
Create a pattern rule for copying an existing test-case, separating out the debug information into a .debug file, and referencing the .debug file from the copied test-case using a .gnu_debuglink. 2019-01-25 Tom de Vries <tdevries@suse.de> * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule. (TESTS): Rename dtest to btest_gnudebuglink. * Makefile.in: Regenerate. From-SVN: r268268
Tom de Vries committed
-
- 23 Jan, 2019 1 commit
-
-
2019-01-23 Tom de Vries <tdevries@suse.de> * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields. (units_search, find_unit): Use size_t for offset. (build_address_map): Use size_t for unit_offset. From-SVN: r268180
Tom de Vries committed
-
- 20 Jan, 2019 1 commit
-
-
From-SVN: r268105
Gerald Pfeifer committed
-
- 18 Jan, 2019 1 commit
-
-
PR libbacktrace/88890 * mmapio.c (backtrace_get_view): Change size parameter to uint64_t. Check that value fits in size_t. * read.c (backtrace_get_view): Likewise. * internal.h (backtrace_get_view): Update declaration. * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view. From-SVN: r268082
Ian Lance Taylor committed
-
- 17 Jan, 2019 8 commits
-
-
Add test-case to verify that libbacktrace can read debug info that was compressed with dwz. 2019-01-17 Tom de Vries <tdevries@suse.de> PR libbacktrace/82857 * configure.ac (DWZ): Set with AC_CHECK_PROG. (HAVE_DWZ): Set with AM_CONDITIONAL. * configure: Regenerate. * Makefile.am (TESTS): Add btest_dwz. * Makefile.in: Regenerate. From-SVN: r268032
Tom de Vries committed -
Handle DW_FORM_GNU_ref_alt which references the .debug_info section in the .gnu_debugaltlink file. 2019-01-17 Tom de Vries <tdevries@suse.de> PR libbacktrace/82857 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO. (read_attribute): Handle DW_FORM_GNU_ref_alt using ATTR_VAL_REF_ALT_INFO. (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt. From-SVN: r268031
Tom de Vries committed -
Add a function that finds the unit given an offset into .debug_info. 2019-01-17 Tom de Vries <tdevries@suse.de> * dwarf.c (struct unit): Add low_offset and high_offset fields. (struct unit_vector): New type. (struct dwarf_data): Add units and units_counts fields. (find_unit): New function. (find_address_ranges): Add and handle unit_tag parameter. (build_address_map): Add and handle units_vec parameter. (build_dwarf_data): Pass units_vec to build_address_map. Store resulting units vector. From-SVN: r268030
Tom de Vries committed -
Handle DW_FORM_GNU_strp_alt which references the .debug_str section in the .gnu_debugaltlink file. 2019-01-17 Tom de Vries <tdevries@suse.de> PR libbacktrace/82857 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt using altlink. From-SVN: r267996
Tom de Vries committed -
Handle DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt references robustly in presence of missing .gnu_debugaltlink file. 2019-01-17 Tom de Vries <tdevries@suse.de> * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE. (read_attribute): Add altlink parameter. Handle missing altlink for DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt. (find_address_ranges, build_address_map, build_dwarf_data): Add and handle altlink parameter. (read_referenced_name, read_function_entry): Add argument to read_attribute call. From-SVN: r267995
Tom de Vries committed -
Add an altlink field to struct dwarf_data, and initialize it with the pointer to the struct dwarf_data for the .gnu_debugaltlink. 2019-01-17 Tom de Vries <tdevries@suse.de> * dwarf.c (struct dwarf_data): Add altlink field. (backtrace_dwarf_add): Add and handle fileline_altlink parameter. * elf.c (elf_add): Add argument to backtrace_dwarf_add call. (phdr_callback, backtrace_initialize): Add argument to elf_add calls. * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter. * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call. * xcoff.c (xcoff_add): Same. From-SVN: r267994
Tom de Vries committed -
Allow the caller of elf_add access to the struct dwarf_data pointer corresponding to the added elf. 2019-01-17 Tom de Vries <tdevries@suse.de> * internal.h (backtrace_dwarf_add): Add fileline_entry parameter. * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter. * elf.c (elf_add): Add and handle fileline_entry parameter. Add argument to backtrace_dwarf_add call. (phdr_callback, backtrace_initialize): Add argument to elf_add calls. * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call. * xcoff.c (xcoff_add): Same. From-SVN: r267993
Tom de Vries committed -
Read the elf file pointed at by the .gnu_debugaltlink section, and verify that the build id matches. 2019-01-17 Tom de Vries <tdevries@suse.de> * elf.c (elf_add): Add and handle with_buildid_data and with_buildid_size parameters. Handle .gnu_debugaltlink section. (phdr_callback, backtrace_initialize): Add arguments to elf_add calls. From-SVN: r267992
Tom de Vries committed
-
- 16 Jan, 2019 2 commits
-
-
Factor out the common handling of DW_AT_abstract_origin and DW_AT_specification from read_function_entry and read_referenced_name. 2019-01-16 Tom de Vries <tdevries@suse.de> * dwarf.c (read_referenced_name_from_attr): New function. Factor out of ... (read_referenced_name): ... here, and ... (read_function_entry): ... here. From-SVN: r267986
Tom de Vries committed -
Both read_function_entry and read_referenced_name implement a priority scheme for names. The priorities are: - 1st: DW_AT_linkage_name - 2nd: Name from DW_AT_abstract_origin or DW_AT_specification - 3rd: DW_AT_name. Ensure both functions fully adhere to it. 2019-01-16 Tom de Vries <tdevries@suse.de> * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any name. (read_function_entry): Same. Don't allow name found via DW_AT_abstract_origin or case DW_AT_specification to override linkage name. From-SVN: r267963
Tom de Vries committed
-
- 09 Jan, 2019 1 commit
-
-
2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 [1/5] contrib/ * mklog: Mechanically replace "can not" with "cannot". gcc/ * Makefile.in: Mechanically replace "can not" with "cannot". * alias.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * common/config/i386/i386-common.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/sync.md: Likewise. * config/arc/arc.c: Likewise. * config/arc/predicates.md: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm.h: Likewise. * config/arm/arm.md: Likewise. * config/arm/cortex-r4f.md: Likewise. * config/csky/csky.c: Likewise. * config/csky/csky.h: Likewise. * config/darwin-f.c: Likewise. * config/epiphany/epiphany.md: Likewise. * config/i386/i386.c: Likewise. * config/i386/sol2.h: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.h: Likewise. * config/microblaze/microblaze.md: Likewise. * config/mips/20kc.md: Likewise. * config/mips/sb1.md: Likewise. * config/nds32/nds32.c: Likewise. * config/nds32/predicates.md: Likewise. * config/pa/pa.c: Likewise. * config/rs6000/e300c2c3.md: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.h: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh.md: Likewise. * config/spu/vmx2spu.h: Likewise. * cprop.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * doc/cfg.texi: Likewise. * doc/extend.texi: Likewise. * doc/fragments.texi: Likewise. * doc/gty.texi: Likewise. * doc/invoke.texi: Likewise. * doc/lto.texi: Likewise. * doc/md.texi: Likewise. * doc/objc.texi: Likewise. * doc/rtl.texi: Likewise. * doc/tm.texi: Likewise. * dse.c: Likewise. * emit-rtl.c: Likewise. * emit-rtl.h: Likewise. * except.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * genautomata.c: Likewise. * gimple-fold.c: Likewise. * hard-reg-set.h: Likewise. * ifcvt.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-fnsummary.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * ira.h: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-streamer-out.c: Likewise. * postreload-gcse.c: Likewise. * predict.c: Likewise. * profile-count.h: Likewise. * profile.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * symtab.c: Likewise. * target.def: Likewise. * toplev.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-core.h: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nrv.c: Likewise. * tree-profile.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-phionlycprop.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssanames.c: Likewise. * tree-streamer-out.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * vr-values.c: Likewise. gcc/ada/ * exp_ch9.adb: Mechanically replace "can not" with "cannot". * libgnat/s-regpat.ads: Likewise. * par-ch4.adb: Likewise. * set_targ.adb: Likewise. * types.ads: Likewise. gcc/cp/ * cp-tree.h: Mechanically replace "can not" with "cannot". * parser.c: Likewise. * pt.c: Likewise. gcc/fortran/ * class.c: Mechanically replace "can not" with "cannot". * decl.c: Likewise. * expr.c: Likewise. * gfc-internals.texi: Likewise. * intrinsic.texi: Likewise. * invoke.texi: Likewise. * io.c: Likewise. * match.c: Likewise. * parse.c: Likewise. * primary.c: Likewise. * resolve.c: Likewise. * symbol.c: Likewise. * trans-array.c: Likewise. * trans-decl.c: Likewise. * trans-intrinsic.c: Likewise. * trans-stmt.c: Likewise. gcc/go/ * go-backend.c: Mechanically replace "can not" with "cannot". * go-gcc.cc: Likewise. gcc/lto/ * lto-partition.c: Mechanically replace "can not" with "cannot". * lto-symtab.c: Likewise. * lto.c: Likewise. gcc/objc/ * objc-act.c: Mechanically replace "can not" with "cannot". libbacktrace/ * backtrace.h: Mechanically replace "can not" with "cannot". libgcc/ * config/c6x/libunwind.S: Mechanically replace "can not" with "cannot". * config/tilepro/atomic.h: Likewise. * config/vxlib-tls.c: Likewise. * generic-morestack-thread.c: Likewise. * generic-morestack.c: Likewise. * mkmap-symver.awk: Likewise. libgfortran/ * caf/single.c: Mechanically replace "can not" with "cannot". * io/unit.c: Likewise. libobjc/ * class.c: Mechanically replace "can not" with "cannot". * objc/runtime.h: Likewise. * sendmsg.c: Likewise. liboffloadmic/ * include/coi/common/COIResult_common.h: Mechanically replace "can not" with "cannot". * include/coi/source/COIBuffer_source.h: Likewise. libstdc++-v3/ * include/ext/bitmap_allocator.h: Mechanically replace "can not" with "cannot". From-SVN: r267783
Sandra Loosemore committed
-
- 01 Jan, 2019 1 commit
-
-
From-SVN: r267494
Jakub Jelinek committed
-
- 29 Dec, 2018 1 commit
-
-
* Makefile.am (xcoff_%.c): Use an actual newline instead of \n in sed pattern. * Makefile.in: Regenerate. From-SVN: r267470
Gerald Pfeifer committed
-
- 28 Dec, 2018 4 commits
-
-
In build_address_map we allocate a unit, and then look for addresses in the unit, which we store in the addrs vector, with the elements pointing to the unit. However, if we cannot find addresses in the unit, the allocated unit is not used. Fix this by detecting if the allocated unit has been used, and reusing it otherwise. Bootstrapped and reg-tested on x86_64. 2018-12-28 Tom de Vries <tdevries@suse.de> * dwarf.c (build_address_map): Reuse unused units. From-SVN: r267445
Tom de Vries committed -
In the main loop in build_address_map, we first read the abbrevs into a local variable abbrevs, and then allocate the corresponding unit, after which we assign the abbrevs to the unit. This results in dedicated free-upon-failure handling for the variable, and extra code to make sure that free-upon-failure doesn't trigger once the unit has taken ownership of the abbrevs. Simplify this by reversing the order of abbrev reading and unit allocation, and eliminating the abbrevs local variable. Bootstrapped and reg-tested on x86_64. 2018-12-28 Tom de Vries <tdevries@suse.de> * dwarf.c (build_address_map): Simplify by removing local variable abbrevs. From-SVN: r267444
Tom de Vries committed -
When failing in build_address_map, we free the unit that's currently being handled in the loop, but the ones that already have been allocated are leaked. Fix this by keeping track of allocated units in a vector, and releasing them upon failure. Also, now that we have a vector of allocated units, move the freeing upon failure of the abbrevs associated with each unit to build_address_map, and remove the now redundant call to free_unit_addrs_vector. Bootstrapped and reg-tested on x86_64. 2018-12-28 Ian Lance Taylor <iant@golang.org> Tom de Vries <tdevries@suse.de> PR libbacktrace/88063 * dwarf.c (free_unit_addrs_vector): Remove. (build_address_map): Keep track of allocated units in vector. Free allocated units and corresponding abbrevs upon failure. Remove now redundant call to free_unit_addrs_vector. Free addrs vector upon failure. Free allocated unit vector. Co-Authored-By: Tom de Vries <tdevries@suse.de> From-SVN: r267443
Ian Lance Taylor committed -
While upon failure in build_address_map we call free_unit_addrs_vector, this does not actually free the addrs vector, but merely the abbrevs of the units pointed at by the elements of the addrs vector. Fix this by adding code to build_address_map to make sure that the addrs vector is freed upon failure. Bootstrapped and reg-tested on x86_64. 2018-12-28 Tom de Vries <tdevries@suse.de> * dwarf.c (build_address_map): Free addrs vector upon failure. From-SVN: r267442
Tom de Vries committed
-
- 14 Dec, 2018 1 commit
-
-
Test-case libbacktrace/allocfail.sh contains bashism "set -o pipefail", which makes the script fail on ubuntu 18.04, which links /bin/sh to /bin/dash. Fix this by removing the "set -o pipefail". Tested by running the test-case with dash on x86_64-linux. 2018-12-14 Tom de Vries <tdevries@suse.de> PR testsuite/88491 * allocfail.sh: Remove "set -o pipefail". From-SVN: r267127
Tom de Vries committed
-
- 12 Dec, 2018 1 commit
-
-
Add test-case that forces alloc.c functions to fail, and check whether fail handling is robust. This is the test-case for "[libbacktrace] Fix segfault upon allocation failure". Without that patch, this test-case fails like this: ... allocfail.sh: line 71: 26041 Segmentation fault (core dumped) \ ./allocfail $i > /dev/null 2>&1 Unallowed fail found: 13 FAIL allocfail.sh (exit status: 1) ... This is a seperate patch because the test-case is nontrivial. Bootstrapped and reg-tested on x86_64. 2018-12-12 Tom de Vries <tdevries@suse.de> * Makefile.am (TESTS): Add allocfail.sh. (check_PROGRAMS): Add allocfail. * Makefile.in: Regenerate. * instrumented_alloc.c: New file. Redefine malloc and realloc. Include alloc.c. * allocfail.c: New file. * allocfail.sh: New file. From-SVN: r267054
Tom de Vries committed
-
- 30 Nov, 2018 3 commits
-
-
When building libbacktrace, we typically use elf.c, and don't build pecoff.c, xcoff.c or unknown.c. Add testcases that use unused format to ensure that we also build and test those on a typical development setup. Bootstrapped and reg-tested on x86_64. 2018-11-30 Tom de Vries <tdevries@suse.de> * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32, test_xcoff_64, test_pecoff and test_unknown. * Makefile.in: Regenerate. * test_format.c: New file. From-SVN: r266668
Tom de Vries committed -
When building libbacktrace, we typically use mmapio.c and mmap.c, and don't build read.c and alloc.c. Add testcases that use read.c and alloc.c to ensure that we also build and test those on a typical development setup. Bootstrapped and reg-tested on x86_64. 2018-11-30 Tom de Vries <tdevries@suse.de> * Makefile.am : Add _with_alloc version for each test in check_PROGRAMS. * Makefile.in: Regenerate. From-SVN: r266667
Tom de Vries committed -
Factor out new function backtrace_vector_free. Bootstrapped and reg-tested on x86_64. 2018-11-30 Tom de Vries <tdevries@suse.de> * internal.h (backtrace_vector_free): New static inline fuction, factored out of ... * dwarf.c (read_line_info): ... here. From-SVN: r266658
Tom de Vries committed
-
- 28 Nov, 2018 1 commit
-
-
If the allocation of abbrevs->abbrevs in read_abbrevs fails, then abbrevs->num_abbrevs remains nonzero, and consequently free_abbrevs will segfault when accessing abbrevs->abbrevs. Fix this by setting abbrevs->num_abbrevs only after abbrevs->abbrevs allocation has succeeded. Bootstrapped and reg-tested on x86_64. 2018-11-28 Tom de Vries <tdevries@suse.de> * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation failure. From-SVN: r266562
Tom de Vries committed
-