NullPointerException in generated bytecode
QT3 test -s:prod-ValueComp -t:value-comp-eq-double-8 fails with an NPE when run with bytecode enabled.
The problem occurs because GenericConverterCompiler.compileToPrimitive() calls compileToItem(), which can leave a null on the stack to represent the empty sequence, and it does not generate code to handle this null value.
Further complicating the situation, it's suboptimal that GenericConverterCompiler is being used in the first place. The CastExpressionCompiler knows that it is converting untyped atomic to double, but for some reason this combination invokes the GenericConverterCompiler rather than the StringToDoubleCompiler.
Updated by Michael Kay over 7 years ago
- Status changed from New to Resolved
- Assignee set to Michael Kay
For 9.6 I have patched GenericConverterCompiler and the test now works.
For 9.7 the test was already working, using StringToDoubleCompiler. I have applied the same patch to GenericConverterCompiler, but it is essentially untested on this branch.
Please register to edit this issue