Unexpected Behavior In ANSI C String Manipulation Functions, With Overlapping Strings
(Doc ID 1336061.1)
Last updated on DECEMBER 23, 2022
Applies to:
Oracle Solaris Studio - Version Forte Developer 6 Update 2 to 12.6 [Release 6.0 to 12] Information in this document applies to any platform.
Symptoms
Some standard library functions from libc which copy, append, or modify strings show unexpected behavior when source string and destination string overlap.
Example:
Changes
The issue is more likely to occur for 64-bit applications than for 32-bit applications.
The issue is more likely to occur on 64-bit applications on Solaris on x86-64
after an upgrade to Solaris 11 (any build 125 or higher)
on Solaris 10 after 142910-17 SunOS 5.10_x86: kernel patch has been applied
The issue is more likely to occur if the offset between the overlapping strings is small.
In many implementations, including the Solaris libc implementation, the issue is more likely to occur when the destination string starts at or after the beginning of the source string, rather than before the beginning of the source string.
Cause
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!