Subaudit/update_pltbind.c contains unreachable code
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 110
- Forks
- 35
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 2
Description
**Priority: Low**
Spindle has two interception paths: the standard `LD_AUDIT` path (used on x86_64 and aarch64) and the SubAudit path (`OPT_SUBAUDIT`) which has only remaining use case of ppc64le.
### Bug: `spindleint_none` is an unreachable enum state.
https://github.com/llnl/Spindle/blob/0380a7cce78a4d654b839af9c191e671dab7ef14/src/client/subaudit/update_pltbind.c#L213
Sets `has_spindleint` to either `spindleint_present` or `spindleint_unset`, but
https://github.com/llnl/Spindle/blob/0380a7cce78a4d654b839af9c191e671dab7ef14/src/client/subaudit/update_pltbind.c#L231-L232
checks for `spindleint_none`.
Because has_spindleint is never set to spindleint_none, two things follow:
1. getenv("LD_PRELOAD") + strstr is called on every la_activity event for the lifetime of the process, rather than being cached after the first check.
2. The redirect_interceptions() call at line 231 is unreachable dead code — spindleint_none is defined in the enum and has a consumer, but is never assigned.
Fix:
```
has_spindleint = ld_preload && strstr(ld_preload, "libspindleint.so") ? spindleint_present : spindleint_none;
```
Potential follow-up:
- Confirm whether redirect_interceptions() / spindleint_none represents intentional design or can be removed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/client/subaudit/update_pltbind.c at the has_spindleint assignment around line 213 and the spindleint_none check around lines 231-232. Trace the la_activity path and confirm that the enum assignment makes the cache and redirect_interceptions() branch reachable. Done means the state handling matches the intended behavior and the unreachable-code and repeated LD_PRELOAD lookup issues are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100