Skip to content

remove dead code#34

Merged
richardstartin merged 1 commit intomainfrom
rgs/remove-dead-code
Oct 11, 2023
Merged

remove dead code#34
richardstartin merged 1 commit intomainfrom
rgs/remove-dead-code

Conversation

@richardstartin
Copy link
Contributor

What does this PR do?:
This code should have been removed as part of previous refactoring, it's now impossible to execute.

Motivation:

Additional Notes:

How to test the change?:

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@github-actions
Copy link
Contributor

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (1)

Style Violations (158)

@github-actions
Copy link
Contributor

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az1242-608
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 clean all
Clang Version:Ubuntu clang version 14.0.0-1ubuntu1.1
Date:Wed Oct 11 13:59:43 2023

Bug Summary

Bug TypeQuantityDisplay?
All Bugs7
Logic error
Assigned value is garbage or undefined1
Dereference of null pointer3
Result of operation is garbage or undefined1
Unused code
Dead initialization1
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorAssigned value is garbage or undefineddwarf.cppparseInstructions23120
Unused codeDead initializationlivenessTracker.cppcleanup_table451
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding7001
Logic errorDereference of null pointerflightRecorder.cppflush13978
Logic errorDereference of null pointersafeAccess.hload3515
Logic errorDereference of null pointersymbols_linux.cppElfParser15435
Logic errorResult of operation is garbage or undefineddwarf.hgetSLeb12325

@richardstartin richardstartin merged commit 088bb65 into main Oct 11, 2023
@richardstartin richardstartin deleted the rgs/remove-dead-code branch January 26, 2024 13:54
jbachorik added a commit that referenced this pull request Jan 29, 2026
Update implementation to match ctx-sharing-demo reference.

Note on naming: "V2" refers to the TLS record format version (struct
layout with flexible array), while "tlsdesc_v1_dev" is the schema/
protocol version string. This matches the reference implementation
which uses customlabels_v2.h but schema_version="tlsdesc_v1_dev".

TLS Record (V2 format):
- Fix struct layout: 28-byte header (removed root_span_id)
- Use flexible array for attrs_data
- Correct field ordering per tlsdesc_v1_dev schema

Process Context:
- schema_version: string "tlsdesc_v1_dev" (was int)
- attribute_key_map: Array encoding (was KvList)
- Mapping: writable (rw-p/rw-s) per PR #34, 1 page
- Remove mprotect to read-only

Fixes:
- clear() properly invalidates V2 record
- Reader accepts both r-- and rw- permissions
- Tests updated for writable mappings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments