[haiku-commits] Re: haiku: hrev51277 - src/system/kernel/fs build/jam

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 12 Jul 2017 11:49:57 -0400

Why is the first commit being reverted? NULL this is indeed undefined
behavior and should be avoided, not worked around by using a compiler flag.

-waddlesplash

On Jul 12, 2017 11:42 AM, <jerome.duval@xxxxxxxxx> wrote:

hrev51277 adds 2 changesets to branch 'master'
old head: 0cc293cf32c417263fe076c365ddb5851688e738
new head: 16c53b7527f9f57a3cf0333378b838e85202c350
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=
16c53b7527f9+%5E0cc293cf32c4

------------------------------------------------------------
----------------

2d4d0f0ac1ca: Revert "vfs.cpp: Fix gcc6 crash."

  This reverts commit 5b55f6dba9d905e26729961a146de825277c9d79.

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx>
]

16c53b7527f9: kernel: disable an optimization on GCC6...

  as a workaround for crashs.

  Signed-off-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx>
]

------------------------------------------------------------
----------------

2 files changed, 8 insertions(+), 8 deletions(-)
build/jam/ArchitectureRules  |  5 +++++
src/system/kernel/fs/vfs.cpp | 11 +++--------

############################################################
################

Commit:      2d4d0f0ac1ca20858024233b7bd7a9026f3b210f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=2d4d0f0ac1ca
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Wed Jul 12 15:36:24 2017 UTC

Revert "vfs.cpp: Fix gcc6 crash."

This reverts commit 5b55f6dba9d905e26729961a146de825277c9d79.

------------------------------------------------------------
----------------

diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp
index f3d562d..ea47773 100644
--- a/src/system/kernel/fs/vfs.cpp
+++ b/src/system/kernel/fs/vfs.cpp
@@ -7275,9 +7275,7 @@ fs_mount(char* path, const char* device, const char*
fsName, uint32 flags,
                FileDeviceDeleter() : id(-1) {}
                ~FileDeviceDeleter()
                {
-                       KDiskDeviceManager* ddm =
KDiskDeviceManager::Default();
-                       if (ddm != NULL)
-                               ddm->DeleteFileDevice(id);
+                       KDiskDeviceManager::Default()-
DeleteFileDevice(id);
                }

                partition_id id;
@@ -7782,11 +7780,8 @@ fs_unmount(char* path, dev_t mountID, uint32 flags,
bool kernel)
                partition->SetVolumeID(-1);
                partition->SetMountCookie(NULL);

-               if (mount->owns_file_device) {
-                       KDiskDeviceManager* ddm =
KDiskDeviceManager::Default();
-                       if (ddm != NULL)
-                               ddm->DeleteFileDevice(partition->ID());
-               }
+               if (mount->owns_file_device)
+                       KDiskDeviceManager::Default()-
DeleteFileDevice(partition->ID());
                partition->Unregister();
        }


############################################################
################

Revision:    hrev51277
Commit:      16c53b7527f9f57a3cf0333378b838e85202c350
URL:         http://cgit.haiku-os.org/haiku/commit/?id=16c53b7527f9
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Mon May  9 04:45:49 2016 UTC
Committer:   Jérôme Duval <jerome.duval@xxxxxxxxx>
Commit-Date: Wed Jul 12 15:40:38 2017 UTC

kernel: disable an optimization on GCC6...

as a workaround for crashs.

Signed-off-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

------------------------------------------------------------
----------------

diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules
index e74950e..b9f06e2 100644
--- a/build/jam/ArchitectureRules
+++ b/build/jam/ArchitectureRules
@@ -327,6 +327,11 @@ rule KernelArchitectureSetup architecture
                HAIKU_KERNEL_C++FLAGS += -std=gnu++11 ;
        }

+       if $(gccVersion[1]) >= 6 {
+               HAIKU_KERNEL_C++FLAGS += -fno-delete-null-pointer-checks ;
+               HAIKU_KERNEL_CCFLAGS += -fno-delete-null-pointer-checks ;
+       }
+
        HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
        HAIKU_KERNEL_PIC_LINKFLAGS = ;
        HAIKU_KERNEL_ADDON_LINKFLAGS = ;



Other related posts: