NullReference in Stryker.Core.Instrumentation.EndingReturnEngine.InjectReturn
See original GitHub issueDescribe the bug NullReference in Stryker.Core.Instrumentation.EndingReturnEngine.InjectReturn when generating mutants.
Logs logs.zip
Expected behavior Not crashing while generating mutants.
Desktop (please complete the following information):
- OS: Windows 10
- Type of project: netstandard2.0
- Framework Version core 3.1
- Stryker Version 0.22.5
Additional context
I am not entirely sure how to read the logs, but the last created mutant [DBG] Mutant 696 created "value.Sign < 0" -> "value.Sign <= 0" using "Stryker.Core.Mutators.BinaryExpressionMutator" (310d25d3)
seems to be a mutation of this method ( that i can share because it is from an open sourced BigRational impl):
public static explicit operator Double( BigRational value ) {
// The Double value type represents a double-precision 64-bit number with
// values ranging from -1.79769313486232e308 to +1.79769313486232e308
// values that do not fit into this range are returned as +/-Infinity
if ( value.Numerator.InDoubleRange() && value.Denominator.InDoubleRange() ) {
return (double)value.Numerator / (double)value.Denominator;
}
// scale the numerator to preseve the fraction part through the integer division
BigInteger denormalized = ( value.Numerator * s_bnDoublePrecision ) / value.Denominator;
if ( denormalized.IsZero )
**return ( value.Sign < 0 ) ? BitConverter.Int64BitsToDouble( unchecked ( (long)0x8000000000000000 ) )
: 0d; // underflow to -+0**
// Note that it does not handle subnormals.
// and +/- infinity detection might be done with " simple" comparison with their BigRational representation ?
double result = 0;
bool isDouble = false;
int scale = DoubleMaxScale;
while ( scale > 0 ) {
if ( !isDouble ) {
if ( denormalized.InDoubleRange() ) {
result = (double)denormalized;
isDouble = true;
}
else {
denormalized = denormalized / 10;
}
}
result = result / 10;
scale--;
}
if ( !isDouble )
return ( value.Sign < 0 ) ? Double.NegativeInfinity : Double.PositiveInfinity;
else
return result;
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
CORE™ 2 Console
(CORE) 2 Console is intended for use in the cutting, ... Refer to the Symbol Definition Chart REF 0036- ... Refer to Instruction...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Stryker version 0.22.6 should be available in a few minutes with the fix!
Closing issue
Just opened a PR for this 😃
Envoyé de mon iPhone