From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#30106: Loading file /sources/emacs/lisp/emacs-lisp/ert.elc failed to provide feature `mod-test' Date: Wed, 17 Jan 2018 22:16:58 +0000 Message-ID: References: <20180114063602.GA9234@protected.rcdrun.com> <83zi5gzalr.fsf@gnu.org> <20180114174748.GA12223@protected.rcdrun.com> <83shb8z0lz.fsf@gnu.org> <20180114221228.GA17422@protected.rcdrun.com> <833737z2jy.fsf@gnu.org> <20180115185533.GA6309@protected.rcdrun.com> <836081y8ra.fsf@gnu.org> <20180116191855.GB18155@protected.rcdrun.com> <83mv1cwl82.fsf@gnu.org> <20180117170310.GA31570@protected.rcdrun.com> <837esgwde8.fsf@gnu.org> <836080w8rr.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403043604144d9f0d0563003505" X-Trace: blaine.gmane.org 1516227380 31025 195.159.176.226 (17 Jan 2018 22:16:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 Jan 2018 22:16:20 +0000 (UTC) Cc: 30106@debbugs.gnu.org, bugs@gnu.support To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 17 23:16:15 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebw08-0007O9-UU for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jan 2018 23:16:09 +0100 Original-Received: from localhost ([::1]:38430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebw28-0004gN-K6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jan 2018 17:18:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebw22-0004gB-60 for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2018 17:18:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebw1y-0002wr-UW for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2018 17:18:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebw1y-0002wZ-Qg for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2018 17:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ebw1y-0000AZ-Fv for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2018 17:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jan 2018 22:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30106 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30106-submit@debbugs.gnu.org id=B30106.1516227437598 (code B ref 30106); Wed, 17 Jan 2018 22:18:02 +0000 Original-Received: (at 30106) by debbugs.gnu.org; 17 Jan 2018 22:17:17 +0000 Original-Received: from localhost ([127.0.0.1]:60640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebw1E-00009a-Tu for submit@debbugs.gnu.org; Wed, 17 Jan 2018 17:17:17 -0500 Original-Received: from mail-lf0-f48.google.com ([209.85.215.48]:39957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebw1D-00009I-1s for 30106@debbugs.gnu.org; Wed, 17 Jan 2018 17:17:15 -0500 Original-Received: by mail-lf0-f48.google.com with SMTP id h92so13645080lfi.7 for <30106@debbugs.gnu.org>; Wed, 17 Jan 2018 14:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EVMQ4F4d+neGBupw/k2pnf8xQYTMeO2K0vzpqNjCjCU=; b=tYovFIb49xlG8ncYNDukvOFugzmRvF3Fyyml4WvDoAAoHud9Ny7t5ExksgI8q/t7uC 0MMJxr9jcMfNAPve4sOH1VipMQDpVRRT0Kd/OZFOoS7YL3EeGscUQGXzcvKlazOVeIjF xGb8crYcjyMyGStPdQNjBl5Mooc5t01AKJzst1LeIB4QTyifcilgp72APjBjw6fthOZk B4ZFLcxpJ0SDRknKP5d9xzvO23b24SkyRaCrhG1ogmUDuD8mSyoF5z60nRcWGrswMZ7A Dtsfwp6RyDQDTSmM2e9TjSBWCBeEA868k3n9uf+mSXnqFxxg3Go9UsTndnOrRqOOce8E Xxkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EVMQ4F4d+neGBupw/k2pnf8xQYTMeO2K0vzpqNjCjCU=; b=Yv0b5bwHoLHeW6KLAmzfOIJl1WtT7iSfQwIq4O8KrucOFOWB9//5Qr5+Exvmf/65pd VwQVqljGTaOXiYq33yH8x1O/Iy9bewf8I8NbQCfLfoVNsCjue8rH4/6AQZDSWaWnsbBf Wee1Ptrgl1cUlq9HT441mg05p2I1uA/MVebv4xl0G0mMZOo5dKjfMH6MsUhlxMuvoRPy ejqlCfgjAV0nJEbfcLeiUgjhT2eHgCeZspA9LYvauMWcIXQ0thVSgm82G3f799DMTyb1 1tskHu2tyF3WnZfuZK9kSV3wfZ4Trm78qnG53xxonSJWm+v+KXqK1GJBIuJrZMDCW0zU SoGA== X-Gm-Message-State: AKwxytd57UK26fhJ0E1ONa4mnozPgvyszGmXeMIZY3mRL3oEIg+9i//X i4nEwYDp7zj1xF/GQRm85MwFkBuz3Ba20L5xI4s= X-Google-Smtp-Source: ACJfBovEYQkiuFqXcmictLEszXWVHP60T5pbxPhP2U9RIu9wInJXMkQwZYmuGqqzZrIdp/+tk1uqrKl0doohZZsJTf8= X-Received: by 10.46.15.2 with SMTP id 2mr1526619ljp.144.1516227428980; Wed, 17 Jan 2018 14:17:08 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142237 Archived-At: --f403043604144d9f0d0563003505 Content-Type: text/plain; charset="UTF-8" Glenn Morris schrieb am Mi., 17. Jan. 2018 um 21:31 Uhr: > Eli Zaretskii wrote: > > >> Same error on rhel 7.4 if configure with --without-threads > --with-modules. > >> > >> Emacs module assertion: Module function called from outside the > current > >> Lisp thread > > > > Does this go away if you put > > > > return true; > > > > at the end of in_current_thread, outside of all the #ifdef's? > > No. > > > > > The current implementation of in_current_thread is definitely bogus if threads are disabled; I can't even compile temacs with --without-threads --with-modules: *emacs-module.c:814:42: **error: **incompatible integer to pointer conversion passing 'sys_thread_t' (aka 'int') to parameter of type 'pthread_t _Nullable'* * (aka 'struct _opaque_pthread_t *') [-Werror,-Wint-conversion]* return pthread_equal (pthread_self (), current_thread->thread_id); * ^~~~~~~~~~~~~~~~~~~~~~~~~* */usr/include/pthread.h:340:59: note: *passing argument to parameter here int pthread_equal(pthread_t _Nullable, pthread_t _Nullable); because if threads are disabled, the thread ID is an int. The function also doesn't handle the case where neither HAVE_PTHREAD nor WINDOWSNT are defined (but maybe we don't have such platforms). Maybe systhread.h should have a function extern sys_thread_t sys_thread_self (); so emacs-module.c doesn't have to care about the threading implementations. --f403043604144d9f0d0563003505 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Glenn = Morris <rgm@gnu.org> schrieb am Mi= ., 17. Jan. 2018 um 21:31=C2=A0Uhr:
Eli Zaretskii wrote:

>> Same error on rhel 7.4 if configure with --without-threads --with-= modules.
>>
>>=C2=A0 =C2=A0Emacs module assertion: Module function called from ou= tside the current
>>=C2=A0 =C2=A0Lisp thread
>
> Does this go away if you put
>
>=C2=A0 =C2=A0return true;
>
> at the end of in_current_thread, outside of all the #ifdef's?

No.





The current implementation of in_curre= nt_thread is definitely bogus if threads are disabled; I can't even com= pile temacs with --without-threads --with-modules:

emacs-module.= c:814:42: error: incompatible integer to pointer conversion = passing 'sys_thread_t' (aka 'int') to parameter of type = 9;pthread_t _Nullable'

=C2=A0 =C2=A0 =C2=A0 (aka = 9;struct _opaque_pthread_t *') [-Werror,-Wint-conversion]

=C2=A0 return pthread_equal (pthre= ad_self (), current_thread->thread_id);

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~~~~~~~~~~~~~~~~~~=

/usr/include/= pthread.h:340:59: note: passing argument to parameter here

int pthread_equa= l(pthread_t _Nullable, pthread_t _Nullable);


because if threads are disabled, the = thread ID is an int.

The function also doesn't handle the case where neither = HAVE_PTHREAD nor WINDOWSNT are defined (but maybe we don't have such pl= atforms).

Maybe systhread.h should ha= ve a function

extern sys_thread_t sys_thread= _self ();

so emacs-module.c doesn't have= to care about the threading implementations.

--f403043604144d9f0d0563003505--