discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gworkspace with non-fragile abi, etc?


From: Lee, Seong-Gu
Subject: Re: Gworkspace with non-fragile abi, etc?
Date: Thu, 29 Aug 2013 21:57:31 +0900
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

On 08/28/2013 05:06 PM, David Chisnall wrote:
> On 27 Aug 2013, at 21:06, Fred Kiefer <fredkiefer@gmx.de> wrote:
> 
>> ou results for the non-fragile API look horrible. To me this looks like
>> a compiler optimisation bug. Sorry I wont be able to help here. But with
>> a little lick we may be able to catch David's attention. For this reason
>> I deleted the rest of the mail and left just that part in it
> 
> 
> That's entirely possible.  I'd recommend trying clang 3.3 instead of a random 
> svn version of 3.4: there may well be bugs introduced that are fixed one or 
> two versions later, and unless you're interested in debugging the compiler 
> it's not worth the effort to bisect.  
> 
> Using -fobjc-nonfragile-abi will give you quite a conservative feature set (I 
> think it's limited to those supported by version 1.5 of the runtime, but I 
> don't remember exactly).  I'd recommend using -fobjc-runtime=gnustep-1.7 
> instead.  The property test failures that you're seeing are as a result of 
> this.
> 
> The last time I ran the GWorkspace code through the static analyser, there 
> were a lot of cases where it was depending on undefined behaviour, so you may 
> be hitting one of these.  Are there any warnings when GWorkspace is built?
> 
> You should be aware that gdb currently doesn't understand the non-fragile 
> ABI, so inspecting ivars won't always work.  
> 
> David
> 

 Dear David,

 Thank you for pointing out several things.
 As following your advise, compiler was changed into not svn build but
distributon default (clang 3.3-5ubuntu2). The result is summerized below.
 Though improved greater than previous poor results (base 3865, gui
668), problems still resist. If basic foundation library makes trouble
, it would not be expected to application's working. So, the build logs
of each applications (GWorkspace, SystemPreferences, etc) were not
attached. Segmentation fault locations of each application were
coincident with failed test (make check).

 By the way, some questions rise from your suggestion.

 Firstly, compiler default of FreeBSD clang 3.3 is nonfragile-abi even
without "--enable-objc-nonfragile-abi" (configuring make), and
"gnustep-config objc-flags" always shows "-fobjc-nonfragile-abi".
Moreover, almost check test passed.
 However, at Linux(Ubuntu), configure shows "nonfragile-abi : not
requested by user" without "--enable-objc-nonfragile-abi" (configuring
make), and "-fobjc-runtime=gnustep-1.7" seems to make no effect for
nonfragile-abi. From submitted previous test result, "No subscripting
support in the compiler" shows up and building Etoile's LanguageKit
"error: -fobjc-arc is not supported on platforms using the legacy
runtime" without "-fojc-nonfragile-abi". I also found your comment at
(http://lists.gnu.org/archive/html/discuss-gnustep/2012-08/msg00020.html)
(http://lists.gnu.org/archive/html/discuss-gnustep/2012-09/msg00100.html)
 Apple's clang manual refer "-fobjc-abi-version=" or
"-fobjc-non-fragile-abi-version="
(https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/clang.1.html)
 Is this bug of configure script or OS/compiler specificity?

 Secondly, you said "gdb currently doesn't understand the non-fragile
ABI". If thus, Does LLDB work on that? I tried that, but it was
difficult for me to use. Instead, gdb indicated it is initialization
with 0 that makes error. However, it is strange that the safest writing
with ZERO is the cause of trouble even though reading uninitialized
variable would be the most dangerous. I could not know the cause comes
from Clang compiler(optimization) or Objective C(loose and runtime type
cheking) or Nonfragile-ABI(undetermined address). Anyway, gdb log from
failed test show these do not make any error or warning on compile and
linking, but on excution. Warnings were on deprecated isa or printing
log which is not related core logic.

 Though having decided not to write long lump-sum message, it is hard to
say the point briefly since my understanding is too low. My interest is
not in in compiler optimization but just knowing whether other people do
not experience this nonfragile-abi trouble. Any comments are welcome. Bye.

 Sincerely yours,
 Lee, Seong-Gu ( at gmail dot com )











PS) make check test results
------------------------------------------------------------------------
        Ubuntu13.10     Ubuntu13.10     Ubuntu13.10     FreeBSD9.2RC3
        Clang 3.3       Clang 3.3       Clang 3.3       Clang 3.3

        Nonfragile      Nonfragile      Nonfragile      Nonfragile
        + debug         + non-debug     + non-debug     + non-debug
                                        + workaround

libobj2 32              32              32              32
base    7838            7750            7838            7835
gui     989             723             986             989

Nonfagile  = "-enable-objc-nonfragile-abi" (configuring make)
debug      = "-enable-debug-by-default" (configuring make)
workaround = base/NSDecimalNumber.m  gui/NSFont.m, NSStringDrawing.m

--------------------------------------------------------------------
These four's removing initialization worked well.

base/NSDecimalNumber.m:171
        NSDecimal d = { 0 };

gui/NSFont.m:738
        CGFloat fontMatrix[6] = { 0, 0, 0, 0, 0, 0};

gui/NSStringDrawing.m:504
        NSRect result = NSZeroRect;

gui/NSStringDrawing.m:683
        NSRect result = NSZeroRect;


This one is out of gdb and my competence.

gui/NSWindow.m:1025
(id) initWithContentRect: (NSRect)contentRect   
                 styleMask: (NSUInteger)aStyle
                   backing: (NSBackingStoreType)bufferingType
                     defer: (BOOL)flag
{
-----------------------------------------------------------------------
1. Nonfragile-abi, debug

1) gnustep-config --objc-flags
-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1
-DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing
-fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
-fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -fPIC -DDEBUG
-fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g
-fobjc-runtime=gnustep-1.7 -fblocks -fgnu-runtime
-fconstant-string-class=NSConstantString -I.
-I/home/kira/GNUstep/Library/Headers
-I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers

2) libobjc2 test

94% tests passed, 2 tests failed out of 34

Total Test time (real) =   3.96 sec

The following tests FAILED:
         23 - PropertyIntrospectionTest2 (OTHER_FAULT)
         24 - PropertyIntrospectionTest2_optimised (OTHER_FAULT)
Errors while running CTest
make: *** [test] Error 8

3) gnustep-test base

   7838 Passed tests
     21 Dashed hopes

All OK!

4) gnustep-test gui

    989 Passed tests
      4 Dashed hopes

All OK!
------------------------------------------------------------------

2. Nonfragile-abi, non-debug

1) gnustep-config --objc-flags
-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1
-DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing
-fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
-fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -fPIC -Wall -DGSWARN
-DGSDIAGNOSE -Wno-import -g -O2 -fblocks -fobjc-runtime=gnustep-1.7
-fgnu-runtime -fconstant-string-class=NSConstantString -I.
-I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers

2) gnustep-tests base
        ...
--- Running tests in base/NSNumber ---

base/NSNumber/test00.m:
Failed file:     test00.m aborted without running all tests!

base/NSNumber/test01.m:
Failed file:     test01.m aborted without running all tests!
--- Running tests in base/NSNumberFormatter ---

base/NSNumberFormatter/basic.m:
Failed file:     basic.m aborted without running all tests!

base/NSNumberFormatter/basic10_4.m:
Failed file:     basic10_4.m aborted without running all tests!
        ...
   7750 Passed tests
     21 Dashed hopes
      4 Failed files

3) gnustep-tests gui
--- Running tests in gui/NSBezierPath ---
--- Running tests in gui/NSCell ---

gui/NSCell/basic.m:
Failed file:     basic.m aborted without running all tests!

gui/NSCell/objectValue.m:
Failed file:     objectValue.m aborted without running all tests!
--- Running tests in gui/NSEvent ---

gui/NSEvent/delta.m:
Failed file:     delta.m aborted without running all tests!
--- Running tests in gui/NSImage ---

gui/NSImage/basic.m:
Failed file:     basic.m aborted without running all tests!
--- Running tests in gui/NSParagraphStyle ---
--- Running tests in gui/NSPasteboard ---
--- Running tests in gui/NSPopUpButton ---

gui/NSPopUpButton/defaultSelection.m:
Failed file:     defaultSelection.m aborted without running all tests!
--- Running tests in gui/NSPrintInfo ---
--- Running tests in gui/NSSavePanel ---

gui/NSSavePanel/setDelegate_reload.m:
Failed file:     setDelegate_reload.m aborted without running all tests!
--- Running tests in gui/NSSliderCell ---

gui/NSSliderCell/minMax.m:
Failed file:     minMax.m aborted without running all tests!
--- Running tests in gui/NSView ---

gui/NSView/NSView_autoresize_and_rounding.m:
Failed file:     NSView_autoresize_and_rounding.m aborted without
running all tests!

gui/NSView/NSView_bounds_scale.m:
Failed file:     NSView_bounds_scale.m aborted without running all tests!

gui/NSView/NSView_convertRect.m:
Failed file:     NSView_convertRect.m aborted without running all tests!

gui/NSView/NSView_frame_bounds.m:
Failed file:     NSView_frame_bounds.m aborted without running all tests!

gui/NSView/NSView_frame_rotation.m:
Failed file:     NSView_frame_rotation.m aborted without running all tests!

gui/NSView/scrollRectToVisible.m:
Failed file:     scrollRectToVisible.m aborted without running all tests!
--- Running tests in gui/TextSystem ---

gui/TextSystem/deallocation.m:
Failed file:     deallocation.m aborted without running all tests!

gui/TextSystem/repeatedAttachmentCellHeight.m:
Failed file:     repeatedAttachmentCellHeight.m aborted without running
all tests!

    723 Passed tests
     15 Failed files
      1 Dashed hope
-----------------------------------------------------------------------

3. Nonfragile-abi, non-debug with workaround

1) gnustep-test base
        ...
   7838 Passed tests
     21 Dashed hopes

All OK!

2) gnustep-test gui
        ...
--- Running tests in gui/NSSavePanel ---

gui/NSSavePanel/setDelegate_reload.m:
Failed file:     setDelegate_reload.m aborted without running all tests!
--- Running tests in gui/NSSliderCell ---
--- Running tests in gui/NSView ---
--- Running tests in gui/TextSystem ---

    986 Passed tests
      3 Dashed hopes
      1 Failed file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]