I have a program, ostensibly working fine (but with occasional non-reproducible weird little problems that point towards some sort of subtle memory corruption), in which I discovered the following error yesterday.
A derived data type to represent a linked list:
type stack_id
character (len = worlen) has_control
type (stack_id), pointer :: had_control
end type stack_id
and the following constructor statement elsewhere in the program:
stack_item = stack_id (routine_name, stack_head)
where the value of routine_name is, on occasion, one character longer than is allowed for in the derived data type 😮ops: 😮ops: .
Can someone tell me the immediate consequence of this error? I am presuming that memory corruption occurs ... if so, is it necessarily of the pointer that follows the character variable in the derived data type?
Is it something that Checkmate should pick up? I can't remember if it is even able to pick up overflow in basic character variables.
Andy