dyninst.git
2 weeks agoELF+DWARF: always parse first entry in source file table (#1184) master wuxx1279/amdgpu
Xiaozhu Meng [Thu, 13 Jan 2022 03:28:29 +0000 (21:28 -0600)]
ELF+DWARF: always parse first entry in source file table (#1184)

rocm-4.5 starts to emit AMD GPU binaries with DWARF 5. I noticed missing source line information for these binaries. The root cause is that dyninst assumes that source file table entry 0 represents "unknown file". This no longer seems to be true in DWARF 5, where entry 0 can represents a real application source file.

2 weeks agoRemove interposed definition of _r_debug (#1176)
Stan Cox [Thu, 13 Jan 2022 02:00:50 +0000 (21:00 -0500)]
Remove interposed definition of _r_debug (#1176)

Previously there was a dynamic relocation against _r_debug in the loader which picked up the interposed definition,
but glibc now uses a direct internal hidden symbol reference and thus no longer updates the interposed object.

2 weeks agostart of work to add automated testing to dyninst! (#1183)
Vanessasaurus [Wed, 12 Jan 2022 19:50:12 +0000 (12:50 -0700)]
start of work to add automated testing to dyninst! (#1183)

start of work to add automated testing to dyninst!

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2 weeks agoadding dyninst release trigger (#1181)
Vanessasaurus [Wed, 12 Jan 2022 19:36:55 +0000 (12:36 -0700)]
adding dyninst release trigger (#1181)

to release a tagged (versioned) container on publication of a release we just
need to add the release -> published trigger, derive the tag from the GITHUB_REF environment
variable, and then tag and push the container

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2 weeks agofixing workflow trigger (#1182)
Vanessasaurus [Wed, 12 Jan 2022 05:39:13 +0000 (22:39 -0700)]
fixing workflow trigger (#1182)

we do not need the build on PR, but we do need on merge into MASTER not MAIN

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2 weeks agoAdding first stage of automated docker build (#1180)
Vanessasaurus [Wed, 12 Jan 2022 05:29:09 +0000 (22:29 -0700)]
Adding first stage of automated docker build (#1180)

* adding first stage of automated docker build

this first workflow include a base container with ubuntu 20.04 and
a set of dependencies chosen by Tim. The base container will be set (after this PR) as a scheduled, nightly build, and we do this so testing each day can simply pull it, re-add the new source code and testsuite, and quickly compile again (on the order of 3.5 minutes vs. 1 hour+ for the entire container build. This update will happen in two stages - this first to deploy the base container, and a follow up to add automated testing using it. Currently this does not upload test results to Tims server, and this is only because I want to talk to him about it first and then test the workflow before PR here.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
3 weeks agoRemove erroneous use of realloc in symtabAPI/Type-mem.h (#1170)
Jonathan R. Madsen [Fri, 7 Jan 2022 18:48:48 +0000 (12:48 -0600)]
Remove erroneous use of realloc in symtabAPI/Type-mem.h (#1170)

2 months agoClean up memoryTracker usage in binaryEdit (#877)
Tim Haines [Sun, 28 Nov 2021 23:44:35 +0000 (17:44 -0600)]
Clean up memoryTracker usage in binaryEdit (#877)

* Store memoryTracker_ as a value instead of pointer

This provides cleaner semantics for its usage and ensures that the it's
default-constructed correctly.

* Code cleanup

* Give codeRange a virtual destructor

This will ensure that memoryTracker objects removed from a codeTree will
correctly get destroyed.

* Simplify inferiorFree

* Free any remaining memoryTrackers on destruction

2 months agoDocumentation updates for 12.0.1 release v12.0.1
Tim Haines [Tue, 23 Nov 2021 21:46:24 +0000 (15:46 -0600)]
Documentation updates for 12.0.1 release

2 months agoRemove NVIDIA external line map configure check (#1162)
Tim Haines [Tue, 23 Nov 2021 19:44:39 +0000 (13:44 -0600)]
Remove NVIDIA external line map configure check (#1162)

Now that we require elfutils >= 0.186, this is no longer needed.

2 months agoIncrease minimum elfutils version to 0.186 (#1161)
Tim Haines [Tue, 23 Nov 2021 19:09:53 +0000 (13:09 -0600)]
Increase minimum elfutils version to 0.186 (#1161)

This is needed to parse NVIDIA's extended line map information.
HPCToolkit makes extensive use of this functionality.

2 months agoRefactor dwarfWalker::findConst (#1160)
Tim Haines [Mon, 22 Nov 2021 19:29:53 +0000 (13:29 -0600)]
Refactor dwarfWalker::findConst (#1160)

This function always returns 'true' and few callsites checked the bool
out variable. Using an optional here makes everything simpler. Logging
has been substantially improved for better tracing.

2 months agoAdd readable name for Symtab::typeRef (#1157)
Tim Haines [Sat, 20 Nov 2021 17:24:06 +0000 (11:24 -0600)]
Add readable name for Symtab::typeRef (#1157)

Arguably, this is completely arbitrary as it could have been spelled
'ref', 'reference', etc. Using the language symbol also allows users to
reconstruct source-level syntax more directly.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoDwarfWalker: clean up interfaces for findDieName and findName (#1154)
Tim Haines [Thu, 18 Nov 2021 00:51:26 +0000 (18:51 -0600)]
DwarfWalker: clean up interfaces for findDieName and findName (#1154)

findDieName always returned 'true', so any checks for its return value
were meaningless. It was also not clear that 'findName' would modify its
argument. The new interface removes that surprise by making the name the
return value.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoAdd conflict with CMake 3.19.0 (#1153)
Tim Haines [Sat, 13 Nov 2021 20:59:08 +0000 (14:59 -0600)]
Add conflict with CMake 3.19.0 (#1153)

There is a bug in 3.19.0 that treats .S files like C-language files.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoDocumentation update for 12.0.0 release (#1151) v12.0.0
Tim Haines [Thu, 11 Nov 2021 20:38:48 +0000 (14:38 -0600)]
Documentation update for 12.0.0 release (#1151)

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoAdd CMake test to check if libdw supports NVIDIA extended line map
Xiaozhu Meng [Wed, 10 Nov 2021 21:55:58 +0000 (15:55 -0600)]
Add CMake test to check if libdw supports NVIDIA extended line map

2 months agoAdjust interface changes in elfutils regarding NVIDIA extended line map
Xiaozhu Meng [Sat, 6 Nov 2021 20:43:17 +0000 (15:43 -0500)]
Adjust interface changes in elfutils regarding NVIDIA extended line map

2 months agoAdd compile-time checking to see if elfutils support nvidia extended line map
Xiaozhu Meng [Thu, 26 Aug 2021 15:51:00 +0000 (10:51 -0500)]
Add compile-time checking to see if elfutils support nvidia extended line map
when the user have specified ENABLE_NVIDIA_EXT_LINE_MAP

2 months agoFix compilation warning and add cmake option ENABLE_NVIDIA_EXT_LINE_MAP
Xiaozhu Meng [Tue, 24 Aug 2021 19:06:46 +0000 (14:06 -0500)]
Fix compilation warning and add cmake option ENABLE_NVIDIA_EXT_LINE_MAP

2 months ago1. Handle unrelocated line map entries for CUBIN
Xiaozhu Meng [Fri, 20 Aug 2021 01:57:13 +0000 (20:57 -0500)]
1. Handle unrelocated line map entries for CUBIN
2. Remove redundant addFunctionRange call to improve performance
3. Add some debug logging

2 months agoInline context from nvidia extended line map identifies an inlined call path
Xiaozhu Meng [Tue, 27 Jul 2021 16:23:42 +0000 (11:23 -0500)]
Inline context from nvidia extended line map identifies an inlined call path

2 months agoStart to construct inlining call chains using Nvidia's extended line map
Xiaozhu Meng [Tue, 20 Jul 2021 15:48:18 +0000 (10:48 -0500)]
Start to construct inlining call chains using Nvidia's extended line map

2 months agocleaning up code for ingesting nvidia extended linemaps
John M Mellor-Crummey [Mon, 12 Jul 2021 15:54:15 +0000 (10:54 -0500)]
cleaning up code for ingesting nvidia extended linemaps

2 months agofirst draft of support for nvidia enhanced line maps
John M Mellor-Crummey [Mon, 12 Jul 2021 03:16:26 +0000 (22:16 -0500)]
first draft of support for nvidia enhanced line maps

2 months agoImprove docs for lookup functions in CodeObject (#1147)
Tim Haines [Thu, 11 Nov 2021 03:00:37 +0000 (21:00 -0600)]
Improve docs for lookup functions in CodeObject (#1147)

Add wording to improve clarity about when a CodeRegion is strictly needed when using the lookup functions.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoRemove AddressSpace::causeTemplateInstantiations (#1149)
Tim Haines [Wed, 10 Nov 2021 19:04:42 +0000 (13:04 -0600)]
Remove AddressSpace::causeTemplateInstantiations (#1149)

This was removed by 47c4dfe96 in 2010.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoRemove unregisterTrapMapping from PCProcess
Tim Haines [Wed, 10 Nov 2021 03:51:53 +0000 (21:51 -0600)]
Remove unregisterTrapMapping from PCProcess

This was disabled in 2013 by fce999f48.

2 months agoRemove thread registration functions from PCProcess
Tim Haines [Wed, 10 Nov 2021 03:50:29 +0000 (21:50 -0600)]
Remove thread registration functions from PCProcess

These were disabled in 2015 by 0e791cce8.

2 months agoRemove PCProcess::getDeadCode
Tim Haines [Wed, 10 Nov 2021 03:48:09 +0000 (21:48 -0600)]
Remove PCProcess::getDeadCode

This was disabled by ab24c9bf0 in 2012. Because it was replaced with an
'assert(0)', it's safe to say no one has used it since it was disabled.

2 months agoRemove memory emulation (#1146)
Tim Haines [Sun, 7 Nov 2021 23:42:16 +0000 (17:42 -0600)]
Remove memory emulation (#1146)

This was disabled by 89919d982 in 2012.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoRemove ppc32 from builds (#1145)
Tim Haines [Sun, 7 Nov 2021 19:53:25 +0000 (13:53 -0600)]
Remove ppc32 from builds (#1145)

* Remove ppc32 from build system

* Remove ppc32 source and header files

* Clean up gitignore in parseThat

* Remove use of arch_ppc_little_endian

* Remove explict use of ppc32_linux macro

* Remove implicit use of ppc32 macro

There are likely more instances.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agofix statement-like macros (#1143)
kupsch [Sun, 7 Nov 2021 19:41:22 +0000 (13:41 -0600)]
fix statement-like macros (#1143)

wrap macro body in 'do {...} while (0)' so they can be used as if they were a
statement with a terminating semicolon.

changed break to return since it then works in a do/while loop and was
semantically the same in all the expansions

parenthesized the use of parameters as needed

2 months agoImplement ppc64 in MachRegister::getROSERegister (#1139)
Tim Haines [Fri, 5 Nov 2021 04:22:15 +0000 (23:22 -0500)]
Implement ppc64 in MachRegister::getROSERegister (#1139)

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoUpdate copyright to 2022 (#1141)
Tim Haines [Wed, 3 Nov 2021 15:17:35 +0000 (10:17 -0500)]
Update copyright to 2022 (#1141)

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoUnify meaning of 'cap_32_64' macro (#1136)
Tim Haines [Tue, 2 Nov 2021 19:03:05 +0000 (14:03 -0500)]
Unify meaning of 'cap_32_64' macro (#1136)

* Unify meaning of 'cap_32_64' macro

Currently, this is used in several different ways due to the historical
original meaning drifting over the years. It's meaning is now "this host
64-bit platform supports modifying 32-bit binaries". Currently, this is
only x86 and PPC32. Although the latter is going away soon due to
obsolescence.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoRemove support for Cray CNL (#1137)
Tim Haines [Tue, 2 Nov 2021 18:21:49 +0000 (13:21 -0500)]
Remove support for Cray CNL (#1137)

The Compute Node Linux (CNL) was for the old XT/XE platforms that
are obsolete now. This should have been removed by e5484368f in
2021. Support for this platform was removed from the test suite by
7e4ab7c12 in 2012.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
2 months agoDon't overflow aarch64 float register vector when setting used regs. (#1127)
Stan Cox [Mon, 1 Nov 2021 18:24:07 +0000 (14:24 -0400)]
Don't overflow aarch64 float register vector when setting used regs. (#1127)

Do not include the subtype when setting a float register as a used register if the registerSlot vector would be exceeded, e.g. for a value like 0x400 (Q_REG/register 0).

3 months agoRemove xlc macros (#1132)
Tim Haines [Fri, 29 Oct 2021 17:01:07 +0000 (12:01 -0500)]
Remove xlc macros (#1132)

* Remove unused XLC macro in dyntypes.h

* Remove XLC check in BPatch_snippet/BPatch_effectiveAddressExpr

This was added by c604218d5 in 2004 for compiling dyninst with xlC as a
static library for AIX compatibility with DPCL- neither of which is
supported by Dyninst now.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoRemove common/src/language.h (#1131)
Tim Haines [Thu, 28 Oct 2021 22:11:30 +0000 (17:11 -0500)]
Remove common/src/language.h (#1131)

This is never used anywhere. We also require a compiler that supports 'typename' implicitly.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoRemove usage of arch_ppc and arch_ppc64 (#1129)
Tim Haines [Thu, 28 Oct 2021 21:36:51 +0000 (16:36 -0500)]
Remove usage of arch_ppc and arch_ppc64 (#1129)

These were removed by f33ba7b in 2013 and should have been converted to
arch_power at that time.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agofix unused const variable warnings
James A. Kupsch [Thu, 28 Oct 2021 20:06:18 +0000 (15:06 -0500)]
fix unused const variable warnings

3 months agofix pessimizing std::move warnings
James A. Kupsch [Tue, 10 Aug 2021 05:50:23 +0000 (00:50 -0500)]
fix pessimizing std::move warnings

3 months agofix xor operator used as power operator
James A. Kupsch [Tue, 10 Aug 2021 05:34:21 +0000 (00:34 -0500)]
fix xor operator used as power operator

2^32  should be  1LL << 32

3 months agofix misleading indentation warning
James A. Kupsch [Tue, 10 Aug 2021 05:33:29 +0000 (00:33 -0500)]
fix misleading indentation warning

3 months agofix uninitialized this and variable warnings
James A. Kupsch [Tue, 10 Aug 2021 05:31:32 +0000 (00:31 -0500)]
fix uninitialized this and variable warnings

3 months agofix float to double promotion warning
James A. Kupsch [Tue, 10 Aug 2021 05:28:20 +0000 (00:28 -0500)]
fix float to double promotion warning

3 months agofix unused const variable warnings
James A. Kupsch [Tue, 10 Aug 2021 05:26:47 +0000 (00:26 -0500)]
fix unused const variable warnings

3 months agoRemove usage of x86_64_cnl (#1130)
Tim Haines [Thu, 28 Oct 2021 21:14:01 +0000 (16:14 -0500)]
Remove usage of x86_64_cnl (#1130)

This was added but never used.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoLoad callee's address when the callee and caller are in the same module (#1056)
Stan Cox [Tue, 26 Oct 2021 21:43:14 +0000 (17:43 -0400)]
Load callee's address when the callee and caller are in the same module (#1056)

If the callee and caller are in the same module and pic is not
required then the callee's address can be loaded directly without
using a relocation.

3 months agoRemove DynC tests (#1126)
Tim Haines [Tue, 26 Oct 2021 15:24:05 +0000 (10:24 -0500)]
Remove DynC tests (#1126)

These have been moved to the examples repository.
https://github.com/dyninst/examples/pull/25

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoRemove NO_INITIALIZER_LIST_SUPPORT (#1125)
Tim Haines [Tue, 26 Oct 2021 15:01:14 +0000 (10:01 -0500)]
Remove NO_INITIALIZER_LIST_SUPPORT (#1125)

Fixes #1124

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoRemove unused generateSimple (#1122)
Tim Haines [Mon, 25 Oct 2021 22:06:00 +0000 (17:06 -0500)]
Remove unused generateSimple (#1122)

This is never called in Dyninst. It also has broken logic.

Fixes #1087

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoRemove unused variables from Symtab
Tim Haines [Mon, 25 Oct 2021 18:10:00 +0000 (13:10 -0500)]
Remove unused variables from Symtab

This is an ABI-breaking change.

Fixes #1062

3 months agoFix possible buffer overflow in BPatch::processCreate
Tim Haines [Mon, 25 Oct 2021 17:19:44 +0000 (12:19 -0500)]
Fix possible buffer overflow in BPatch::processCreate

3 months agoGive global annotation objects internal linkage and file scope
Tim Haines [Mon, 25 Oct 2021 16:53:22 +0000 (11:53 -0500)]
Give global annotation objects internal linkage and file scope

This was technically an ODR violation because they are in two different
translation units that _could_ be linked together. However, I don't
think they ever were. This fix will preclude any such problem, though.

3 months agoFix uninitialized variable use in DispatcherARM64::iproc_init
Tim Haines [Mon, 25 Oct 2021 16:53:22 +0000 (11:53 -0500)]
Fix uninitialized variable use in DispatcherARM64::iproc_init

3 months agoRemove stabs from documentation (#1120)
Tim Haines [Mon, 25 Oct 2021 16:46:54 +0000 (11:46 -0500)]
Remove stabs from documentation (#1120)

This should have been part of #1113

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoTurn on STERILE_BUILD by default (#1118)
Tim Haines [Mon, 25 Oct 2021 16:14:15 +0000 (11:14 -0500)]
Turn on STERILE_BUILD by default (#1118)

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
3 months agoRemove special Fortran debug handling
Tim Haines [Tue, 19 Oct 2021 18:54:19 +0000 (13:54 -0500)]
Remove special Fortran debug handling

lang_Fortran_with_pretty_debug was only for Fortran with stabs.

3 months agoRemove stabs from symbol demangling
Tim Haines [Tue, 19 Oct 2021 18:50:31 +0000 (13:50 -0500)]
Remove stabs from symbol demangling

3 months agoRemove stabs from BPatch
Tim Haines [Tue, 19 Oct 2021 18:49:10 +0000 (13:49 -0500)]
Remove stabs from BPatch

3 months agoRemove stabs from SymtabAPI
Tim Haines [Tue, 19 Oct 2021 18:46:44 +0000 (13:46 -0500)]
Remove stabs from SymtabAPI

3 months agoupdate minimum boost version to 1.70.0 (#1117)
kupsch [Fri, 22 Oct 2021 20:10:26 +0000 (15:10 -0500)]
update minimum boost version to 1.70.0 (#1117)

3 months agoRemove boost_system linking (#1112)
Zixian Liu [Tue, 19 Oct 2021 17:06:28 +0000 (01:06 +0800)]
Remove boost_system linking (#1112)

boost_system is header-only in 1.69.0 which is the min version required by dyninst.

Signed-off-by: sdlzx <hdu_sdlzx@163.com>
3 months agoSummit fixes (#1108)
Xiaozhu Meng [Tue, 12 Oct 2021 19:31:04 +0000 (14:31 -0500)]
Summit fixes (#1108)

* Replace assert with throw exceptions

* fix conditional branch instruction conversion to Rose instruction for ppc64le

4 months agoEnforce detection of libiberty (#1099)
Tim Haines [Fri, 10 Sep 2021 20:14:10 +0000 (15:14 -0500)]
Enforce detection of libiberty (#1099)

This correctly requires that libiberty be present and removes building it from source. Both of these were bugs introduced by 08097f23.

Co-authored-by: Tim Haines <thaines@cs.wisc.edu>
4 months agoremove executable flag from .dyninst_heap section (#1096)
kupsch [Thu, 2 Sep 2021 18:35:50 +0000 (13:35 -0500)]
remove executable flag from .dyninst_heap section (#1096)

This prevents the library/object with this code from having a segment violates
the W^X security property for segments as the current setting resulted in
segment with both the WRITE and EXECUTE flags set.  The function
mark_heaps_exec() restores execute protection to just the heap arrays.

5 months agofix compiler warnings to work with clang (#1092)
kupsch [Mon, 9 Aug 2021 21:46:44 +0000 (16:46 -0500)]
fix compiler warnings to work with clang (#1092)

- detect warning flag test failure on clang correctly by updating the failure
  regular expression to include clang's unknown warning flag message

- fix preprocessor macro tests for scoped attributes in C

5 months agoupdate optimization (-Og) and debug flags (-g3) (#1084)
kupsch [Mon, 9 Aug 2021 21:36:54 +0000 (16:36 -0500)]
update optimization (-Og) and debug flags (-g3) (#1084)

5 months agouse the C11 standard for C code in Dyninst (#1086)
kupsch [Fri, 6 Aug 2021 17:07:49 +0000 (12:07 -0500)]
use the C11 standard for C code in Dyninst (#1086)

5 months agofix broken cast of a char literal to pointer (#1090)
kupsch [Fri, 6 Aug 2021 16:50:27 +0000 (11:50 -0500)]
fix broken cast of a char literal to pointer (#1090)

The code should have been a string literal not a char literal.

5 months agofix possibly uninitialized variables (#1082)
James A. Kupsch [Tue, 3 Aug 2021 05:52:02 +0000 (00:52 -0500)]
fix possibly uninitialized variables (#1082)

make method always assign the parameters even in the event of errors,
and check for errors and do not use them if an error occurred.

This diagnostic only occurs with -O3.  In practice this is a false
positive as this should not occur with a valid arm instruction.

5 months agofix possible null 'this' pointer dereference (#1082)
James A. Kupsch [Tue, 3 Aug 2021 05:33:40 +0000 (00:33 -0500)]
fix possible null 'this' pointer dereference (#1082)

If a nullptr is passed to the second parameter of the Field class's constructor
then there is a nullptr this pointer dereference for the boost::shared_ptr that
is the second parameter as the reshare() method is called.  The second
parameter is a nullptr in BPatch_type::getComponents is the type is and enum
type.  This warning is only diagnosed with -Og (and maybe -O1).

5 months agoprevent maybe uninitialized warning (#1082)
James A. Kupsch [Tue, 3 Aug 2021 04:50:35 +0000 (23:50 -0500)]
prevent maybe uninitialized warning (#1082)

This is a false positive with -Og.  Initialize the variable to 0 to prevent
the warning.  The value is only used if a boolean is true and if it is true
then the value is set.

5 months agoadjust large frame threshold for specific sources (#1082)
James A. Kupsch [Mon, 26 Jul 2021 19:13:38 +0000 (14:13 -0500)]
adjust large frame threshold for specific sources (#1082)

5 months agofix deprecated implicit assignment operator (#1082)
James A. Kupsch [Tue, 20 Jul 2021 15:35:42 +0000 (10:35 -0500)]
fix deprecated implicit assignment operator (#1082)

remove (default equivalent) copy constructors, so all implicitly
generated operators are defaulted.  THey should all be default or
explicitly defined

5 months agofix buffer overflow (#1082)
James A. Kupsch [Tue, 20 Jul 2021 15:33:43 +0000 (10:33 -0500)]
fix buffer overflow (#1082)

5 months agofix duplicate branch condition by removing branch (#1082)
James A. Kupsch [Mon, 19 Jul 2021 18:42:43 +0000 (13:42 -0500)]
fix duplicate branch condition by removing branch (#1082)

Commented out else if condition and then block.  else if condition
happens to be identical to the if condition due to constant identifiers
having the same value.

The tests should be made more specific to distinguish the two cases or
the commented out else if should be removed.

5 months agofix out of bounds array access (#1082)
James A. Kupsch [Wed, 14 Jul 2021 20:15:46 +0000 (15:15 -0500)]
fix out of bounds array access (#1082)

use ->uc_mcontext.regs->nip which follows the 32 array entries of the
same type in ->uc_mcontext.regs->gpr[] instead of access gpr[32] which
happens to work

5 months agofix potentially uninitialized variable warning (#1082)
James A. Kupsch [Wed, 14 Jul 2021 15:24:32 +0000 (10:24 -0500)]
fix potentially uninitialized variable warning (#1082)

5 months agouse unused variable to correct code (#1082)
James A. Kupsch [Wed, 14 Jul 2021 15:17:03 +0000 (10:17 -0500)]
use unused variable to correct code (#1082)

5 months agoremove unused variables (#1082)
James A. Kupsch [Wed, 14 Jul 2021 15:15:38 +0000 (10:15 -0500)]
remove unused variables (#1082)

5 months agomake printf format and argument types match (#1082)
James A. Kupsch [Wed, 14 Jul 2021 14:48:11 +0000 (09:48 -0500)]
make printf format and argument types match (#1082)

5 months agofix broken bool expression that was always true (#1082)
James A. Kupsch [Tue, 13 Jul 2021 21:23:33 +0000 (16:23 -0500)]
fix broken bool expression that was always true (#1082)

5 months agoadd missing initializer braces (#1082)
James A. Kupsch [Tue, 13 Jul 2021 16:48:49 +0000 (11:48 -0500)]
add missing initializer braces (#1082)

Should be OK without extra brace, but early C++11 required it, and some
versions of gcc complain with -Wmissing-braces

5 months agomake constructor public so class is usable (#1082)
James A. Kupsch [Tue, 13 Jul 2021 16:47:14 +0000 (11:47 -0500)]
make constructor public so class is usable (#1082)

5 months agoremove ';' after in-class method definitions (#1082)
James A. Kupsch [Mon, 12 Jul 2021 03:54:45 +0000 (22:54 -0500)]
remove ';' after in-class method definitions (#1082)

5 months agoeliminate logical op warning (#1082)
James A. Kupsch [Sun, 11 Jul 2021 04:31:12 +0000 (23:31 -0500)]
eliminate logical op warning (#1082)

gcc warns about clauses to a logical operation being identical.
They are identical comparisons but the values are from different
macros and/or enum values.

5 months agomake implicit double promotions explicit (#1082)
James A. Kupsch [Sun, 11 Jul 2021 01:22:25 +0000 (20:22 -0500)]
make implicit double promotions explicit (#1082)

5 months agoannotate malloc-like functions (#1082)
James A. Kupsch [Sun, 11 Jul 2021 00:08:01 +0000 (19:08 -0500)]
annotate malloc-like functions (#1082)

5 months agomake method noexcept, so noexcept expr can be true (#1082)
James A. Kupsch [Sat, 10 Jul 2021 18:13:15 +0000 (13:13 -0500)]
make method noexcept, so noexcept expr can be true (#1082)

5 months agoadd missing default to switch statement (#1082)
James A. Kupsch [Sat, 10 Jul 2021 02:56:57 +0000 (21:56 -0500)]
add missing default to switch statement (#1082)

5 months agofix int to void* cast if sizeof(int)<sizeof(void*) (#1082)
James A. Kupsch [Sat, 10 Jul 2021 01:52:07 +0000 (20:52 -0500)]
fix int to void* cast if sizeof(int)<sizeof(void*) (#1082)

5 months agoeliminate conversion of NULL to non-pointer type (#1082)
James A. Kupsch [Sat, 10 Jul 2021 01:14:14 +0000 (20:14 -0500)]
eliminate conversion of NULL to non-pointer type (#1082)

5 months agofix variable signedness (#1082)
James A. Kupsch [Sat, 10 Jul 2021 01:09:04 +0000 (20:09 -0500)]
fix variable signedness (#1082)

5 months agoreplace if stmt with identical branches with then stmt (#1082)
James A. Kupsch [Sat, 10 Jul 2021 01:05:17 +0000 (20:05 -0500)]
replace if stmt with identical branches with then stmt (#1082)

5 months agofgetc returns an int not a char (#1082)
James A. Kupsch [Sat, 10 Jul 2021 00:02:30 +0000 (19:02 -0500)]
fgetc returns an int not a char (#1082)

5 months agodo not discard volatile type qualifier in cast (#1082)
James A. Kupsch [Fri, 9 Jul 2021 23:57:27 +0000 (18:57 -0500)]
do not discard volatile type qualifier in cast (#1082)

5 months agoadd missing #include <assert.h> (#1082)
James A. Kupsch [Fri, 9 Jul 2021 23:51:12 +0000 (18:51 -0500)]
add missing #include <assert.h> (#1082)