ckaestne / TypeChef

Type checking ifdef variability
https://ckaestne.github.io/TypeChef/
Other
76 stars 36 forks source link

Infinite inclusion of self referencing header file #38

Closed szabta89 closed 8 years ago

szabta89 commented 9 years ago

I was playing around with the s2n library with TypeChef when I encountered this file: https://github.com/awslabs/s2n/blob/master/crypto/s2n_sequence.h. This header file has an inclusion on itself. The #pragma once directive gives the necessary hint for gcc not to fail here, but TypeChef ends up in an infinite loop. The only reason why it stops (in my case in the command line), because the OS does not allow any more file handles to be opened.

failed: java.io.FileNotFoundException: .../git/s2n.stuff/remote/crypto/s2n_sequence.h (Too many open files in system) at : -1 : -1

ckaestne commented 9 years ago

TypeChef does not support any #pragma directives at this point; it's widely supported but not standard. This is an issue that would need to be fixed in the partial preprocessor (or xtc).

Pull requests welcome :)