tags 123041 patch thanks On Sun, Feb 17, 2002 at 04:06:37AM +0000, Colin Watson wrote: > This is a 64-bit issue; jikes assumes that sizeof(int) == sizeof(void*), > which isn't true on alpha or ia64. Specifically, in src/ast.h it tries > to declare objects of type AstArray<LexStream::TokenIndex>, where > LexStream::TokenIndex is a typedef for int. I'll try to track this down > some more tomorrow, but in the meantime here's a gdb backtrace.
This patch fixes - or at least works around - the problem. While I don't think it's guaranteed by the C(++) standard that sizeof(long) == sizeof(void*), it's true on all architectures we're releasing with woody. Upstream should work out something that uses a real pointer, but that's more than I care to try to do as somebody with no experience of hacking jikes. I've left the LEX_INFINITY constant as it is, as values of TokenIndex will very likely be assigned to int types at various points. With this patch applied, jikes builds successfully on alpha and i386, and generates code that's byte-for-byte identical with its output without the patch both for the simple test case I mentioned earlier in the bug report and for a complete build of antlr. --- jikes-1.15.orig/src/stream.h +++ jikes-1.15/src/stream.h @@ -191,7 +191,7 @@ public: typedef int TypeIndex; - typedef int TokenIndex; + typedef long TokenIndex; typedef int CommentIndex; enum { LEX_INFINITY = INT_MAX }; // the largest possible value for TokenIndex The last seven uploads of jikes have been NMUs. Since another bug (#119551) is holding up freenet-unstable, would there be a problem with me making another one? If so, do debian-java think it would be better to apply the backport patch mentioned in #119551 or to upgrade wholesale to the upstream major-bug-fix release mentioned in #133616? -- Colin Watson [EMAIL PROTECTED]