Message325632
Issue32374 added a new subtest (test_bad_traverse) in test_importlib. The test succeeds when a script calling a bad_traverse exits with a non-zero status (e.g., crashes because of segmentation violation)
This patch "fixes" Modules/_testmultiphase.c so that it exits with a non-zero status when a NULL pointer is accessed. This is what was causing other systems to 'crash' expectedly - while AIX was not.
A simple demo program to demonstrate the difference behavior of AIX:
/*
* Program to show whether an executable crashes, or not
* when a NULL pointer is accessed
* Author: AIXTOOLS
*/
#include<stdio.h>
main()
{
long *vpt = NULL;
fprintf(stdout, "vpt = %08lx\n", (long) vpt);
if (*vpt)
fprintf(stdout,"True\n");
else
fprintf(stdout,"False\n");
}
On AIX:
root@x066:[/data/prj/python/git]make nullpr; ./nullpr
cc nullpr.c -o nullpr
vpt = 00000000
False
On a Linux server:
root@x074:/data/prj/python/git# rm nullpr; make nullpr; ./nullpr
make: Warning: File 'nullpr.c' has modification time 352 s in the future
cc nullpr.c -o nullpr
nullpr.c:8:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
make: warning: Clock skew detected. Your build may be incomplete.
vpt = 00000000
Segmentation fault |
|
Date |
User |
Action |
Args |
2018-09-18 12:03:05 | Michael.Felt | set | recipients:
+ Michael.Felt |
2018-09-18 12:03:05 | Michael.Felt | set | messageid: <1537272185.7.0.956365154283.issue34720@psf.upfronthosting.co.za> |
2018-09-18 12:03:05 | Michael.Felt | link | issue34720 messages |
2018-09-18 12:03:05 | Michael.Felt | create | |
|