Opened 8 years ago
Closed 7 years ago
#13285 closed enhancement (fixed)
Incorporation of GCC 6
Reported by: | korli | Owned by: | korli |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Build System | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Provisioning ticket for GCC 6 to track activities and see if it works well. Current release is 6.3
Attachments (4)
Change History (21)
comment:3 by , 7 years ago
Hi, I think we need resolve two bugs to build with gcc6.
- We need to update src/apps/serialconnect/libvterm/src/encoding.c to avoid -Werror=misleading-indentation at line 77-85.
http://cgit.haiku-os.org/haiku/tree/src/apps/serialconnect/libvterm/src/encoding.c#n77
https://github.com/neovim/libvterm/commit/224b8dcde1c9640c29a34aa60c0f0d56ad298449
- We need to resolve -Werror=nonnull-compare in src/add-ons/kernel/file_systems/userlandfs/shared/ObjectTracker.cpp at line 80 and 93.
comment:5 by , 7 years ago
I tested hrev51266, build succeeded with GCC 6.4.But haiku crashes at startup. Adding '-fno-delete-null-pointer-checks' to kernel flags may be workaround for it.
comment:6 by , 7 years ago
patch: | 0 → 1 |
---|
by , 7 years ago
Attachment: | 0003-Fix-gcc6-crash.patch added |
---|
follow-up: 8 comment:7 by , 7 years ago
Maybe better to try to "fix" the code: it seems KDiskDeviceManager::Default() can be NULL at https://github.com/haiku/haiku/blob/master/src/system/kernel/fs/vfs.cpp#L7784 and https://github.com/haiku/haiku/blob/master/src/system/kernel/fs/vfs.cpp#L7278
It seems that AutoLocker checks if fLockable isn't NULL... see https://github.com/haiku/haiku/blob/master/headers/private/shared/AutoLocker.h#L130
comment:8 by , 7 years ago
Replying to korli:
Maybe better to try to "fix" the code: it seems KDiskDeviceManager::Default() can be NULL
I added null check to vfs.cpp at line 7282 and 7784, then gcc6 build works. But, gcc5 build works without applying patch or kernel flags. So I think gcc6 deletes null pointer check somewhere in kernel.
by , 7 years ago
Attachment: | 0001-vfs.cpp-Fix-gcc6-crash.patch added |
---|
comment:9 by , 7 years ago
Applied in hrev51274. AutoLocker should probably panic in the kernel when used with a NULL Lockable.
comment:10 by , 7 years ago
comment:11 by , 7 years ago
@korli: please set the "obsolete" flag on patches when applying them and keeping the ticket open. Otherwise it's hard to track which are still waiting to be merged.
comment:12 by , 7 years ago
It seems null check need to be done before assigning the value [1], so I rewrite vfs.cpp patch. After that hrev51386 gcc6 build boots without '-fno-delete-null-pointer-checks' flag.
[1] https://isc.sans.edu/diary/A+new+fascinating+Linux+kernel+vulnerability/6820
by , 7 years ago
Attachment: | 0002-vfs.cpp-Fix-gcc6-crash.patch added |
---|
comment:13 by , 7 years ago
mt, I'm sorry but adding such checks didn't go through already with hrev51274. Why would it go in this place? The flag '-fno-delete-null-pointer-checks' is already effective anyway.
comment:14 by , 7 years ago
korli, sorry, I had forgotten that hrev51274 works, please ignore my previous comment.
comment:15 by , 7 years ago
patch: | 1 → 0 |
---|
comment:17 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
GCC7 is now used by default in hrev51973.
Should probably include binutils 2.28.