Issue 127896 - Possible access to unintended macro in "openoffice/main/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx" line 256
Summary: Possible access to unintended macro in "openoffice/main/bridges/source/cpp_un...
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2018-09-17 14:39 UTC by Petru-Florin Mihancea
Modified: 2018-10-23 11:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Petru-Florin Mihancea 2018-09-17 14:39:39 UTC
While experimenting with a CodeSonar plugin we develop, we noticed a
potential issue in file "openoffice/main/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx" line 256 function classify_argument:

 /*  X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS.  */
if ( classes[i] == X86_64_X87UP_CLASS
     && ( i == 0 || classes[i - 1] != X86_64_X87_CLASS ) )
  classes[i] = X86_64_SSE_CLASS; //HERE

Shouldn't X86_64_X87_CLASS be used instead of X86_64_SSE_CLASS?

Petru-Florin Mihancea
Comment 1 oooforum (fr) 2018-09-19 08:30:26 UTC
Could you provide a sample document with a macro to expose this defect?
Comment 2 Petru-Florin Mihancea 2018-09-19 08:56:42 UTC
Unfortunately, no. The problem was detected using static source code analysis. I have no idea how we could expose the issue playing the user role.

However, the comment and lines 247-251 make pretty clear from our point of view that the programmer intent was to use X86_64_X87_CLASS.

Btw, I reported several other similar issues, some of them maybe even more obvious than this one. Maybe you could take a look on them too.

Petru-Florin Mihancea
Comment 3 oooforum (fr) 2018-10-23 11:59:39 UTC
I'm not a developer so I can't say if this code is in defect.
The better will be that you provide a patch and/or a way to demonstrate that.