From nobody Sat May 7 15:42:52 2022 X-Original-To: x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AB5571AC163F for ; Sat, 7 May 2022 15:42:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KwWsm3gZgz3tDf for ; Sat, 7 May 2022 15:42:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F5FB137A3 for ; Sat, 7 May 2022 15:42:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 247Fgqdn095464 for ; Sat, 7 May 2022 15:42:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 247FgqS1095463 for x11@FreeBSD.org; Sat, 7 May 2022 15:42:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 263845] graphics/libglvnd: crashes on armv7 with SIGILL Date: Sat, 07 May 2022 15:42:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fuz@fuz.su X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: x11@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651938172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J0k2JPrW6gq1MIDD1rt2inqiANPwPMKAOzFng1QJkbo=; b=NKrZLMyWP1FEe/JJqOJu0Z4MgFg1Dw4QxepFPKNgc6aW2d7kiSKSaxpwj9KATZ3oBRjeFo evx5q0QIA1fasejKdwrJt65TG563F2+Z0ktt77TSqlfe8+n0UCYw9fSUMFCa2HUowFuSnu 9ipeAmGI2WfcgMwlmQ3Bg/+QHzq+a4lcfr9T8PBKWyF6F/U/C8lartv7qKnOaBUnALa2mK gJpLjCEadvWRJf+iWInnA03aXcV+wre7kRp/mdNa6nZvlQ4h5HubK2UH1TNr62qZzCLo/J Z87LccIkLlbYLQ/efhD01GvIyZJtP1xbaC3gLKmKrqF5QV8Vef3gy4R2y17qWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651938172; a=rsa-sha256; cv=none; b=PyU8N9c5ElCAeSODzCPLQtT2nNFbJZ4JYcfqhS9mYt8uL4ptzoc8E2adUMR3gntsdb63ub LXaUVwRNxy80pt9z1Yv+PECohNBEJYtvaupAomrg+cSc9pP64xev79Xade1wEISAzNAm1W mtFkeRJGOYFJlr9atThM3ubiGonVdnoDADZFuOxteY4i51lnCS16Sr+3bKpCgkYxmwTTzk 54oTpEJ/8pA2rqTk/wC7e1vJkZc0wGKD0WWm4oZIDQCgqoo0AC5s+jskiGwZdO6wrRvZsH E/HZrh5Z9i7Wihzaym2DRxek2Ro8i8dhIZY7Y9deu94Fnf4TEVDlwI6gqCfxNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263845 Bug ID: 263845 Summary: graphics/libglvnd: crashes on armv7 with SIGILL Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: x11@FreeBSD.org Reporter: fuz@fuz.su Assignee: x11@FreeBSD.org Flags: maintainer-feedback?(x11@FreeBSD.org) The following simple program crashes with SIGILL when compiled on armv7 Fre= eBSD 13: #include int main() { glGetError(); } I am compiling with "cc -I/usr/local/lib -L/usr/local/include test.c -lGL. = My package version is libglvnd 1.4.0_1 and I've tested this both on native arm= v7 and in an armv7 jail running on arm64. The behaviour is extremely strange. I am aware that glvnd does some sort of dispatch logic to get to the platform's native driver, but this does not ma= tch what I see. When I try to debug this code, it seems that it is somehow iterating through the entirety of the the libGL API, only to then crash after having gone thr= ough glWriteMaskEXT. I do not understand what the purpose of this is and it does not seem to match any code I found in the library. Digging further into this, it seems that the library is compiled in ARM mod= e, but executed in Thumb mode for some reason (wtf). I suspect this might be because the source file src/GLdispatch/vnd-glapi/entry_armv7_tsd.c uses ".thumb_func" to label the stub entry points, but then they don't get compi= led in thumb mode for some reason. --=20 You are receiving this mail because: You are the assignee for the bug.=