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 5
    • Issues 5
    • 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
  • #317824

Closed
Open
Opened Apr 21, 2018 by raphw@raphw

ACC_SYNTHETIC attribute is lost for < Java 1.5 if the constant pool is copied

I observe that a Java agent is failing a retransformation when the constant pool is copied where the JVM indicates that a method modifier has changed. I pinned it down to a class file (< Java 1.5) that is generated by ASM where a method looses its synthetic modifier. If I do not copy the constant pool (by using new ClassWriter(0) rather then new ClassWriter(reader, 0), the problem does not occur. The method in question is not transformed in any way.

Unfortunately, I struggle to create a reproduction. I assume that it is related to the short cut being taken in MethodWriter::putMethodInfo where the modifier seems to be stripped without that the attribute is added for class files before 1.5.

The issue seems to be similar to #317822 (closed)

Edited Apr 21, 2018 by raphw
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: asm/asm#317824