detect libc on BSD like on macosX
Categories
(Chat Core :: Security: OTR, defect)
Tracking
(thunderbird78 fixed)
| Tracking | Status | |
|---|---|---|
| thunderbird78 | --- | fixed |
People
(Reporter: gaston, Assigned: clokep)
References
Details
Attachments
(1 file)
|
898 bytes,
patch
|
KaiE
:
review+
gaston
:
feedback+
wsmwk
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
small oneliner to fix libc detection at runtime (seen errors in js console):
Index: comm/chat/modules/CLib.jsm
--- comm/chat/modules/CLib.jsm.orig
+++ comm/chat/modules/CLib.jsm
@@ -28,6 +28,7 @@ switch (OS) {
fname_t = wchar_t.ptr;
break;
case "darwin":
+ case "openbsd":
libcAbi = ctypes.default_abi;
libcPath = ctypes.libraryName("c");
break;
filing to see if there's interest in fixing this..
| Reporter | ||
Comment 1•5 years ago
|
||
FreeBSD probably wants the same ?
| Assignee | ||
Comment 2•5 years ago
|
||
This looks fine to me, KaiE -- do you agree?
| Assignee | ||
Updated•5 years ago
|
Why not move libc under default case instead of enumerating every OS? I don't use Thunderbird.
See https://github.com/arlolra/ctypes-otr/commit/1917f769d656 for the old behavior.
Comment 4•5 years ago
|
||
(In reply to Jan Beich from comment #3)
See https://github.com/arlolra/ctypes-otr/commit/1917f769d656 for the old behavior.
It's not clear what you want to demonstrate with this patch, which apparently refers to a revision that is two years older than the snapshot that we used as the base for porting over to TB.
If it's relevant, please explain.
Comment 5•5 years ago
|
||
(In reply to Landry Breuil (:gaston) from comment #1)
FreeBSD probably wants the same ?
Here is code that checks for multiple variations of BSD. Should we map all those strings to the same as Darwin?
https://searchfox.org/comm-central/rev/771b2328aa3096e6c907f477d7ebd862c8bf0841/mozilla/build/gyp_includes/common.gypi#85
Comment 6•5 years ago
|
||
Can someone make a patch with all the strings? Then I can r+ and commit.
| Assignee | ||
Comment 7•5 years ago
|
||
This adds the additional BSD systems, I debated adding a comment of where to look for this, but figured it wasn't worth it.
I tested this on macOS and it still worked without a problem, but don't have a(nother) BSD system to test on.
| Reporter | ||
Comment 8•5 years ago
|
||
| Reporter | ||
Comment 9•5 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #4)
(In reply to Jan Beich from comment #3)
See https://github.com/arlolra/ctypes-otr/commit/1917f769d656 for the old behavior.
It's not clear what you want to demonstrate with this patch, which apparently refers to a revision that is two years older than the snapshot that we used as the base for porting over to TB.
If it's relevant, please explain.
i think jan meant to say 'before this commit, the default/fallback was working ootb on the BSDs'
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f7b582eabc68
Detect libc for OTR on BSD. r=kaie
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
| bugherder uplift | ||
Thunderbird 78.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/c240eda98256
Updated•5 years ago
|
Comment 14•4 years ago
|
||
The FreeBSD libc.so has been a linker script for 7 years prior to this change: https://cgit.freebsd.org/src/commit/?id=54f82841d5116d345fef2610dce38984c01a7ce1
It has to be linked directly:
case "freebsd":
libcAbi = ctypes.default_abi;
libcPath = "libc.so.7";
break;
All the other BSDs should be correct.
| Assignee | ||
Comment 15•4 years ago
|
||
(In reply to Jakub Šebek from comment #14)
The FreeBSD
libc.sohas been a linker script for 7 years prior to this change: https://cgit.freebsd.org/src/commit/?id=54f82841d5116d345fef2610dce38984c01a7ce1
If this is not working properly on FreeBSD, please file a new bug so we can track this separately.
Comment 16•4 years ago
|
||
(In reply to Patrick Cloke [:clokep] from comment #15)
(In reply to Jakub Šebek from comment #14)
The FreeBSD
libc.sohas been a linker script for 7 years prior to this change: https://cgit.freebsd.org/src/commit/?id=54f82841d5116d345fef2610dce38984c01a7ce1If this is not working properly on FreeBSD, please file a new bug so we can track this separately.
Sure, Bug 1764118
Description
•