From mboxrd@z Thu Jan 1 00:00:00 1970 From: dorian.araneda@intel.com To: gcc-gnats@gcc.gnu.org Subject: optimization/3329: optimization large memory copies uses kernel memcpy function without user's knowledge. Date: Thu, 21 Jun 2001 08:16:00 -0000 Message-id: <20010621150810.31468.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00897.html List-Id: >Number: 3329 >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:16:01 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: