Apache OpenOffice (AOO) Bugzilla – Issue 127896
Possible access to unintended macro in "openoffice/main/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx" line 256
Last modified: 2018-10-23 11:59: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? Thanks, Petru-Florin Mihancea
Could you provide a sample document with a macro to expose this defect?
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. Thanks, Petru-Florin Mihancea
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.