[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-11-25 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=444003

Albert Astals Cid  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Latest Commit||https://invent.kde.org/fram
   ||eworks/kjs/commit/fc93534ad
   ||433d5c5a41e0a4a1168253a0a0e
   ||69a6
 Resolution|--- |FIXED

--- Comment #16 from Albert Astals Cid  ---
Git commit fc93534ad433d5c5a41e0a4a1168253a0a0e69a6 by Albert Astals Cid.
Committed on 25/11/2021 at 23:28.
Pushed by aacid into branch 'master'.

Don't call functions on pointers that may not point to objects

The JSValue pointers sometimes are just a number (i.e. 3) so calling
functions on them is not allowed (and is starting to crash on latest
clang when compiled with optimization).

So always use a static function when the pointer may not be a real
pointer

M  +8-8autotests/ecmatest.cpp
M  +6-6src/kjs/ExecState.cpp
M  +2-2src/kjs/JSVariableObject.cpp
M  +4-4src/kjs/JSWrapperObject.cpp
M  +3-3src/kjs/api/kjsinterpreter.cpp
M  +12   -12   src/kjs/api/kjsobject.cpp
M  +18   -19   src/kjs/array_instance.cpp
M  +37   -37   src/kjs/array_object.cpp
M  +4-4src/kjs/bool_object.cpp
M  +49   -49   src/kjs/bytecode/codes.def
M  +2-2src/kjs/bytecode/machine.cpp.in
M  +1-1src/kjs/bytecode/opcodes.cpp.in
M  +2-2src/kjs/collector.cpp
M  +36   -36   src/kjs/date_object.cpp
M  +8-8src/kjs/error_object.cpp
M  +13   -13   src/kjs/function.cpp
M  +14   -14   src/kjs/function_object.cpp
M  +5-5src/kjs/internal.cpp
M  +1-1src/kjs/internal.h
M  +7-7src/kjs/interpreter.cpp
M  +8-8src/kjs/json_object.cpp
M  +19   -19   src/kjs/jsonstringify.cpp
M  +7-7src/kjs/kjs.cpp
M  +2-2src/kjs/list.cpp
M  +1-1src/kjs/lookup.h
M  +8-8src/kjs/math_object.cpp
M  +2-2src/kjs/nodes.cpp
M  +26   -26   src/kjs/number_object.cpp
M  +35   -35   src/kjs/object.cpp
M  +9-4src/kjs/object.h
M  +30   -30   src/kjs/object_object.cpp
M  +26   -26   src/kjs/operations.cpp
M  +4-4src/kjs/property_map.cpp
M  +11   -11   src/kjs/propertydescriptor.cpp
M  +17   -17   src/kjs/regexp_object.cpp
M  +48   -50   src/kjs/string_object.cpp
M  +41   -16   src/kjs/value.cpp
M  +289  -88   src/kjs/value.h
M  +3-3tests/testkjs.cpp

https://invent.kde.org/frameworks/kjs/commit/fc93534ad433d5c5a41e0a4a1168253a0a0e69a6

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-11-03 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=444003

Kevin Funk  changed:

   What|Removed |Added

 CC||kf...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-10-28 Thread James Beddek
https://bugs.kde.org/show_bug.cgi?id=444003

--- Comment #15 from James Beddek  ---
Thanks for the patch! It fixes the kjs test as well as all the okular tests
that were failing. Cheers

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-10-28 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=444003

--- Comment #14 from Albert Astals Cid  ---
James you seem to know how to compile stuff, can you confirm that the patch in
https://invent.kde.org/frameworks/kjs/-/merge_requests/5/diffs helps?

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-10-28 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=444003

Bug Janitor Service  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|ASSIGNED

--- Comment #13 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/kjs/-/merge_requests/5

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-10-28 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=444003

--- Comment #12 from Albert Astals Cid  ---
I can reproduce the problems with asan/ubsan, working on a path

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kjs] [Bug 444003] kjsapitest segmentation fault (UB)

2021-10-27 Thread James Beddek
https://bugs.kde.org/show_bug.cgi?id=444003

James Beddek  changed:

   What|Removed |Added

Summary|kjsfunctionstest|kjsapitest segmentation
   |segmentation fault  |fault (UB)

--- Comment #11 from James Beddek  ---
See below for where that Clang change introduced segfaults like mine,
determined to be from UB.

https://reviews.llvm.org/D99790#2678384

-- 
You are receiving this mail because:
You are watching all bug changes.