i386 build is broken, missing defines for 64-bit file operations in source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libldm (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
ldmtool fails to scan disk for ldm data on 32-bit system
open("/dev/sda", O_RDONLY) = 3
ioctl(3, BLKSSZGET, [512]) = 0
pread64(3, "3\300\
pread64(3, "PRIVHEAD\
fstat64(3, {st_mode=
ioctl(3, BLKGETSIZE64, [320072933376]) = 0
mmap2(NULL, 1052672, PROT_READ|
pread64(3, 0xb6eb0008, 1048576, 184467440716588
syscall pread64 is expecting 64bit offset here, but on 32-bit system only 4 bytes are pushed on stack so it grabs garbage for missing 32 bits.
There should be #define _FILE_OFFSET_BITS 64 set somewhere in the code.
I am not very familiar with ubuntu's development to submit correct patch on my own :)
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ldmtool 0.2.3-3
ProcVersionSign
Uname: Linux 4.4.0-93-generic i686
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: i386
CurrentDesktop: Unity
Date: Wed Sep 20 00:55:24 2017
InstallationDate: Installed on 2017-09-16 (3 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release i386 (20170801)
SourcePackage: libldm
UpgradeStatus: No upgrade log present (probably fresh install)