[rustjava-bound-bootstrap-method-attr-index] feat(classfile): bootstrap_method_attr_index 가 「실재하는」 부트스트랩 메서드를 가리키게 한다 - #47
Merged
Conversation
added 2 commits
September 16, 2026 14:45
…ap_method_attr_index 가 «실재하는» 부트스트랩 메서드를 가리키게 한다 JVMS 4.4.10·4.7.23. 두 축이 한 술어다 — 속성 부재는 «0항목 표»라 어떤 인덱스도 못 가리킨다. - validate_class 의 bootstrap_method_indices_resolve(풀과 클래스 속성을 둘 다 쥔 유일한 자리) - 새 에러 타입 0(기존 ClassFileError::InvalidFormat 에 접었다) - 픽스처 +1 LdcDynamicBSMIndexPastEnd(1항목 표에 인덱스 1) - 진단 전환: UnsupportedOperationException -> ClassFormatError(의도된 거부 확대)
…동봉 (PR #47 · --merge)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을
Dynamic/InvokeDynamic상수의bootstrap_method_attr_index가 BootstrapMethods 테이블 안을 가리키는지 검사한다.★두 축이 한 술어다 — 속성이 «아예 없는» 경우는 «항목 0개짜리 표»여서 어떤 인덱스도 못 가리킨다:
근거
bootstrap_method_attr_index는BootstrapMethods의bootstrap_methods배열에 대한 유효한 인덱스여야 한다.Dynamic/InvokeDynamic을 가진 클래스는 그 속성을 가져야 한다.ClassFormatError: Missing BootstrapMethods attribute.대가 — 숨기지 않는다
★의도된 «거부 확대»다. 지금까지
UnsupportedOperationException(「이 런타임이 아직 못 한다」)로 조용히 넘어가던 파일이★
ClassFormatError(「이 파일이 깨졌다」)로 거부된다. 어떤 JVM 도 못 읽는 파일이라 그 전환이 이 회차의 산출물 자체다.★새 에러 타입 0 — 기존
ClassFileError::InvalidFormat에 접었다(호출부 변종 증가 0).자리
validate_constant_pool이 아니라validate_class— 풀과 «클래스 속성»을 둘 다 쥔 유일한 자리이고,그 교차가 이 검사가 여태 없던 이유였다. 그 자리의 낡은 주석이 스스로 그렇게 적고 「원하는 회차에 맡긴다」고 했다.
검증 — 네 축 + 개악 3종
LdcDynamicBSMIndexPastEnd(신규)LdcDynamic·Ldc2WDynamic·StringConcat·Lambda·ConstantKindsLdcDynamicNoBSMHello·Switch·OddEven·Superclass…truefalsefalsetest_hello류 green★셋째 개악이 필요한 이유:
false하나로는 「정상 인덱스가 통과한다」와 「속성 불요 클래스가 통과한다」가 동시에 red 라 갈리지 않는다.cargo test --all568 / 0 failed / 1 ignored — ★수 불변(테스트를 «치환»했다) ⇒ 수는 증거가 아니고 개악이 증거다.★픽스처 재생성 멱등: 기존 10개 바이트 불변 · 신규 1개만 추가. DoD 7줄 전건 rc=0.
채택 제안
2026-09-16-bootstrap-methods-and-method-handle#p1·2026-09-16-ldc-tags-15-16-17#p0(서로 다른 회차가 독립으로 같은 결함에 닿았다 · worklog json
adoptedProposals에 전건 기록)남긴 것
BootstrapMethods중복 선언은 여전히 거부하지 않는다(JVMS 4.7.23 은 «최대 1개» ·find_map이 첫 것만 본다) — 후속 추천에 적었다.