Issue Details (XML | Word | Printable)

Key: PCC-255
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Detlef Riekenberg
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.

cpp ran out of macro space (with patch)

Created: 23/Feb/11 08:52 PM   Updated: 01/Mar/11 07:24 PM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File support_files_with_lots_of_macros.diff (0.3 kB)
2. File test.c (0.1 kB)

Environment: i686/linux

 Description  « Hide
pcc failed to build many parts of Wine with the message:
error: out of macro space!

The attached patch inreased SBSIZE to get compilation of Wine further.
(I added code to dump the used size and got values >915000)

By by ... Detlef

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 23/Feb/11 09:11 PM
I think there is a macro space leakage somewhere; I'll investigate this further before wrapping increasing sizes.

Anders Magnusson added a comment - 26/Feb/11 07:37 AM
Please recheck now, I have fixed a macro space leakage in macro expansion.

Iain Hibbert added a comment - 26/Feb/11 12:53 PM
This seems to be partially fixed (I had three instances to look at), but I still see one issue in src/external/bsd/iscsi on NetBSD-current (from december) using the following command

pcc -E -Wp,-CC -I/var/cvs/NetBSD-current/src/external/bsd/iscsi/lib/../dist/include /var/cvs/NetBSD-current/src/external/bsd/iscsi/lib/../dist/src/lib/initiator.c > /dev/null

(adjust paths accordingly)

in this case this is invoked by lint hence the -Wp,-CC and this is relevant as compilation does work without that flag.. I tried increasing the SBSIZE as Detlef did but even with 10x the value it still fails

Anders Magnusson added a comment - 26/Feb/11 12:57 PM
Do you get "out of macro space" or "pushback buffer full"?

Iain Hibbert added a comment - 26/Feb/11 06:08 PM
compile the attached file with "pcc -E -Wp,-CC test.c" and you will get the "out of macro space!" error

(perhaps unrelated to the original issue?)

Anders Magnusson added a comment - 01/Mar/11 07:24 PM
Ok, the -CC case also fixed now, thanks!