[mod_python] Apache EAPI

Rich Salz rsalz at zolera.com
Fri Nov 9 09:37:25 EST 2001


> As fas as I understand, if Apache didn't crash immediately after or even
> before issuing the EAPI warning, then you're using one of those C
> compliers (gcc probably) that fill missing parts of strucures with NULLs
> and you're safe.

The issue is not that parts are missing, but that the structure changed
size.

You got lucky.  It might be you got lucky all the time, it might be you
got lucky each time the program started.

It's like this.  Create a file foo.c:
	char buf[4] = { 'h', 'i', 't', 't' };
	int x = 1234;
Create a file bar.c
	#include <stdio.h>
	extern char buf[8];
	int main(int ac, char **av) {
		printf("%s\n", buf);
		return 0;
	}
Compile and run
	cc foo.c bar.c ; ./a.out

It all depends on how your compiler and linker and operating system lay
out the data.

The ONLY safe thing to do is compile ALL your modules with -DEAPI

-- 
Zolera Systems, Your Key to Online Integrity
Securing Web services: XML, SOAP, Dig-sig, Encryption
http://www.zolera.com



More information about the Mod_python mailing list