On 3/24/25 15:41, Eirik Bakke wrote: >> Tried to find an easy way how to verify that the generated bytecode is >> correct. The easiest proof would be to confirm that the transformed code >> matches the patch. > Great work, Matthias... thanks for that effort!
no problem - was a fun learning experience. I might update it to a full agent if time permits - not sure when though. >> I'm not sure we have a good way to provide OS and JDK specific default >> arguments? In which case, we're left with having it switched off by >> default, or having a no-op agent loaded on other OS and JDK < 24 ?? > I think the agent code can just check the Java version from the "premain" > class and exit immediately if the patch is not applicable. Is that what you > mean by "no-op" agent? yep. Since the JDK patching isn't mission-critical for NB's operation the agent should check if the runtime version is within the supported range of the provided ASM lib and if it isn't it should log & return instead of hard crashing. It shouldn't create more headache than necessary during testing. regards, -mbien > > -- Eirik > > > From: Neil C Smith <neilcsm...@apache.org> > Reply-To: "dev@netbeans.apache.org" <dev@netbeans.apache.org> > Date: Monday, March 24, 2025 at 6:40 AM > To: "dev@netbeans.apache.org" <dev@netbeans.apache.org> > Subject: Re: Adapting xxDark's Clipboard Problem Fix > > On Sat, 22 Mar 2025 at 18:37, Matthias Bläsing > <mblaes...@doppel-helix.eu.inva<mailto:mblaes...@doppel-helix.eu.inva>lid> > wrote: > without the "why" please lets not jump to conclusions. This might be > just an asm incompatibility. And Neil already mentioned, that the JDK24 > classfile api might be an alternative. > > I'm not sure I did?! I pointed at the use of manual bytecode patching > over ASM in Jan's original agent approach to removing the > SecurityManager. Using the classfile API is reversing that problem. > > While having this fix only working on JDK 24+ probably isn't an issue, > I'm not sure we have a good way to provide OS and JDK specific default > arguments? In which case, we're left with having it switched off by > default, or having a no-op agent loaded on other OS and JDK < 24 ?? I > think I might be coming back around to Michael's suggestion of the > patch jar, with instructions for the zip, and the patch already > included in the community installers. :-) > > Best wishes, > > Neil > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > dev-unsubscr...@netbeans.apache.org<mailto:dev-unsubscr...@netbeans.apache.org> > For additional commands, e-mail: > dev-h...@netbeans.apache.org<mailto:dev-h...@netbeans.apache.org> > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists