This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]