Bug #4971
Object array resize
100%
History
#1 Updated by Greg Shah almost 6 years ago
- Description updated (diff)
From Marian:
When an non-fixed extent variable of type
objectis resized the actual object type previously saved indynamicArrayTypeis reset inArrayAssigner(line 1125), the comment on that being the type is not needed anymore.Problem is, such variable can be set back to a non-fixed extent using unknown/null as input to
extentfunction and then it can be set to another fix extent and so on, there is no limit on how many time the variable can be moved from undetermined to fixed size and back. The issue being, the next time when the array is resized the object type is no longer known and we and-up with anobjectthat has no type - this leads to NPE when assigned later on.Attempted a fix in 4384g rev 11706 but maybe I'm missing something here so better to double check...
The test that was failing for us:
oo/openedge/core/assert/object.p
#2 Updated by Greg Shah over 5 years ago
- Assignee set to Constantin Asofiei
#3 Updated by Constantin Asofiei over 5 years ago
The fix in 4384g rev 11706 looks OK - when resizing to zero, the type is extracted from the array's first element and saved back to dynamicArrayType for the new, zero-length, copy array.
#4 Updated by Greg Shah over 5 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed