optimization/3330: optimization large memory copies uses kernel memcpy function without user's knowledge.

dorian.araneda@intel.com dorian.araneda@intel.com
Thu Jun 21 08:36:00 GMT 2001


>Number:         3330
>Category:       optimization
>Synopsis:       optimization large memory copies uses kernel memcpy function without user's knowledge.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 08:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dorian S. Araneda
>Release:        unknown-1.0,  version that comes with SuSE 7.1
>Organization:
>Environment:
SuSE 7.1, Pentium II, kernel module compiled with: cc -Wall -O   
>Description:
if I do an assignment of one large structure to another, "myLargeStruct1 = myLargeStruct2", compiler optimization will
choose to use kernel memcpy() instead of generating its own assembly language.  this causes problems for compiled code that must remain
kernel generic and never intend to use kernel calls. Object code will contain mismatched memcpy symbols between
kernels implementing symbol version signatures.  I do not know at what structure size the optimizer looks for to decide whether to use memcpy or
not.  All I know is that the user is unaware that this linkage is occurring and the only way to discover what the compiler did is recognizing the
error and examining the ".s" files.
>How-To-Repeat:
create some large structues. i dont know what size to use.
and do an assignment   "largestruct_1 = largestruct_2"
>Fix:
I correct the problem by using my own function that implements the functionality of memcpy.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list