[New-bugs-announce] [issue34720] Fix test_importlib for AIX
Michael Felt
report at bugs.python.org
Tue Sep 18 08:03:05 EDT 2018
New submission from Michael Felt <aixtools at felt.demon.nl>:
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 at x066:[/data/prj/python/git]make nullpr; ./nullpr
cc nullpr.c -o nullpr
vpt = 00000000
False
On a Linux server:
root at 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
----------
components: Tests
messages: 325632
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: Fix test_importlib for AIX
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34720>
_______________________________________
More information about the New-bugs-announce
mailing list