scan-build is unhappy with python3.5-dev (3.5.0~rc1-1): error: _Atomic cannot be applied to incomplete type 'void'

Bug #1484666 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.5 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I use Clang's scan-build to do static analysis on my Python3 C extensions during their Debian package build.

Now that Python 3.5rc1 has hit Wily, this is failing when building against Python 3.5.

But it wasn't failing against 3.5b4, still isn't failing against 3.4.3.

No changes were made in my C code in the mean time, so I'm pretty sure I'm not to blame :P

Full build log is here:

https://launchpadlibrarian.net/214403448/buildlog_ubuntu-wily-amd64.degu_0.14.0~alpha~bzr361~ubuntu15.10.1_BUILDING.txt.gz

And here's the interesting excerpt:

+ DEGU_INSTRUMENT_BUILD=true scan-build --status-bugs -analyze-headers python3.5 setup.py build_ext -i
scan-build: Using '/usr/lib/llvm-3.6/bin/clang' for static analysis
running build_ext
building 'degu._base' extension
/usr/share/clang/scan-build-3.6/ccc-analyzer -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c degu/_base.c -o build/temp.linux-x86_64-3.5/degu/_base.o -std=gnu11 -Werror -pedantic-errors -Wsign-compare -Wsign-conversion -fsanitize=address -fsanitize=undefined -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null -fsanitize=return -fsanitize=signed-integer-overflow
In file included from degu/_base.c:24:
In file included from degu/_base.h:24:
In file included from /usr/include/python3.5m/Python.h:53:
/usr/include/python3.5m/pyatomic.h:35:5: error: _Atomic cannot be applied to incomplete type 'void'
    _Atomic void *_value;

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: python3.5-dev 3.5.0~rc1-1
ProcVersionSignature: Ubuntu 4.1.0-3.3-generic 4.1.3
Uname: Linux 4.1.0-3-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.18-0ubuntu6
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Aug 13 13:33:19 2015
SourcePackage: python3.5
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jason Gerard DeRose (jderose) wrote :
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Hmm, interestingly this scan-build error is only happening when I instrument the build with asan, ubsan.

Although that still doesn't totally explain it as it works fine when building against 3.4.3.

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

One more note, just in case the above was confusing: I've been using asan, ubsan to instrument the build I run my unit tests against for quite some time, so this wasn't a recent change that introduced any new variables.

My hunch is still that Python 3.5rc1 probably introduced this problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.