On 16/04/2023 18:59, Mark Thomas wrote:
On 14/04/2023 21:38, Christopher Schultz wrote:

The proposed 8.5.88 release is:
[ ] Broken - do not release
[X] Stable - go ahead and release as 8.5.88 (stable)

Build is reproducible on Windows x64 but not Linux x64.

Unit tests pass on Linux x64, Windows x64, MacOS M1 and MacOS x64.

It appears the compiler constructs a slightly different class for NioEndpoint$Poller when compiling on Linux x64. I started to dig into why but didn't reach a conclusion. Investigating further is on my TODO list.

I have made some progress. The difference is in how the following line is handled (there are other differences but this is the first and the other differences may be as a result of this one).

https://github.com/apache/tomcat/blob/8.5.x/java/org/apache/tomcat/util/net/NioEndpoint.java#L846

When compiling on Windows with Java 11 targeting Java 7 the following byte code is generated:

...
126:  aload             %4
128: invokevirtual org.apache.tomcat.util.net.NioChannel.getIOChannel ()Ljava/nio/channels/SocketChannel; (32)
131:  checkcast         <java.nio.channels.WritableByteChannel> (121)
134:  astore            %6
...

When compiling on Linux with Java 11 targeting Java 7 the checkcast command is not present. Neither is it present when compiling on Windows with Java 11 targeting Java 8.

This is arguably a bug in the compiler - the byte code should be the same across platforms - but having researched things this far, I don't plan to pursue this further.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to