Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920478 - x11-terms/aterm-1.0.1-r6 - command.c: error: passing argument 3 of read_32bit_property from incompatible pointer type [-Wincompatible-pointer-types]
Summary: x11-terms/aterm-1.0.1-r6 - command.c: error: passing argument 3 of read_32bit...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ilia Mirkin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2023-12-21 15:31 UTC by Toralf Förster
Modified: 2024-11-03 00:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.65 KB, text/plain)
2023-12-21 15:31 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,62.95 KB, text/plain)
2023-12-21 15:31 UTC, Toralf Förster
Details
environment (environment,74.29 KB, text/plain)
2023-12-21 15:31 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.13 KB, application/x-xz)
2023-12-21 15:31 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,16.71 KB, application/x-xz)
2023-12-21 15:31 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,7.19 KB, application/x-xz)
2023-12-21 15:31 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,122.70 KB, text/plain)
2023-12-21 15:31 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,23.36 KB, application/x-xz)
2023-12-21 15:31 UTC, Toralf Förster
Details
x11-terms:aterm-1.0.1-r6:20231221-151117.log (x11-terms:aterm-1.0.1-r6:20231221-151117.log,29.89 KB, text/plain)
2023-12-21 15:31 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-12-21 15:31:29 UTC
                 from rxvt.h:142,
                 from command.c:50:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 1687 | extern KeySym XKeycodeToKeysym(
      |               ^~~~~~~~~~~~~~~~
command.c: In function 'process_x_event':
command.c:2517:88: error: passing argument 3 of 'read_32bit_property' from incompatible pointer type [-Wincompatible-pointer-types]
 2517 |                    if( read_32bit_property (Xroot, _XROOTPMAP_ID, &p) )
      |                                                                   ^~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-20231220-133504

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-14 *
clang/llvm (if any):
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.6
Python 3.11.7
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.74.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
*)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm
  [2]   openjdk-bin-21 

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
go version go1.21.5 linux/amd64

  HEAD of ::gentoo
commit 1c7ec5ce713dc877f29623e556c5344ebd552c8a
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Dec 21 14:18:49 2023 +0000

    2023-12-21 14:18:48 UTC

emerge -qpvO x11-terms/aterm
[ebuild  N    ] x11-terms/aterm-1.0.1-r6  USE="xgetdefault -background -cjk"
Comment 1 Toralf Förster gentoo-dev 2023-12-21 15:31:30 UTC
Created attachment 880156 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-21 15:31:31 UTC
Created attachment 880157 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-12-21 15:31:33 UTC
Created attachment 880158 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-12-21 15:31:33 UTC
Created attachment 880159 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-12-21 15:31:34 UTC
Created attachment 880160 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-21 15:31:35 UTC
Created attachment 880161 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-21 15:31:36 UTC
Created attachment 880162 [details]
qlist-info.txt
Comment 8 Toralf Förster gentoo-dev 2023-12-21 15:31:37 UTC
Created attachment 880163 [details]
temp.tar.xz
Comment 9 Toralf Förster gentoo-dev 2023-12-21 15:31:39 UTC
Created attachment 880164 [details]
x11-terms:aterm-1.0.1-r6:20231221-151117.log
Comment 10 Ilia Mirkin 2024-11-03 00:08:42 UTC
Looks like the application is doing something slightly-dodgy-but-works-in-practice.

Client-side, Pixmap is "unsigned long", which is 64-bit on amd64. I think server-side it's a CARD32, and I'm not sure that these IDs can ever be > 32bit.

The application also uses CARD32 for some things inexplicably, rather than e.g. XID.

read_32bit_property calls XGetWindowProperty and ensures that the "actual_format" is 32 before writing to the CARD32 ptr. Except we're passing in a Pixmap*, which is a pointer to a 64-bit value. Since amd64 is LE, the bottom bits get set correctly, and the upper bits are garbage. But I suspect they end up being ignored in practice down the line.

This logic relates to transparency, and I know that transparency works -- I use it. So I'm thinking just change the Pixmap to a CARD32 and trudge along. The alternative is switching everything to use XID from CARD32, but that'd be more invasive.