Project

General

Profile

Bug #2386

STRING(memptr_var) will render the contents of the memptr as a null terminated string

Added by Greg Shah over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Greg Shah over 9 years ago

See uast/memptr/memptr_to_string.p.

In the 4GL, the contents seem to be read from index 1 (1-based indexing) and include anything up to the null terminator byte. It probably just does an implicit GET-STRING(var, 1).

The current memptr.toString() implementation just returns an empty string (or "?" if unknown).

Check the following edge cases:

  • Uninitialized memptr.
  • 0-sized memptr (should be the same thing as uninitialized).
  • Unknown value memptr.

Based on the testing results, fix the memptr.toString() implementation.

Also available in: Atom PDF