Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
asm
asm
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • asm
  • asmasm
  • Issues
  • #317824

Closed
Open
Opened Apr 21, 2018 by raphw@raphw
  • Report abuse
  • New issue
Report abuse New issue

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
2
Labels
#bug core
Assign labels
  • View project labels
Reference: asm/asm#317824