Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
asm
asm
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • asm
  • asmasm
  • Issues
  • #317882

Closed
Open
Opened Aug 30, 2019 by Fred Curts@fcurts

Remapper can't handle class names used in string switches

We use https://github.com/johnrengelman/shadow to shadow all our dependencies, which is essential for avoiding version conflicts. Under the hood, the shadow plugin uses ASM to remap class names in class files, e.g., com.oracle.truffle.api.impl.Accessor -> com.mycompany.thirdparty.truffle.api.impl.Accessor.

We found that ASM's remapper can't handle the following code: https://github.com/oracle/graal/blob/master/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java#L631-L654

The reason is that javac compiles string switches to switches on precomputed string hash codes. While remapper correctly changes the string constants, it doesn't update the hash codes, effectively breaking the string switch.

Edited Aug 30, 2019 by Fred Curts
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: asm/asm#317882