64-bit code with 32-bit pointers (-mx32) no longer working
Windows Version
Microsoft Windows [Version 10.0.22631.5335]
WSL Version
2.5.7.0
Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
Kernel Version
6.6.87.1-1
Distro Version
Ubuntu 24.04
Other Software
No response
Repro Steps
Write basic C program that is compiled with the -mx32 flag.
Expected Behavior
C Application built with -mx32 flag with either GCC or Clang fails to execute.
Actual Behavior
Diagnostic Logs
No response
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The script will output the path of the log file once done.
If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here
Once completed please upload the output files to this Github issue.
Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
Previously enabled x32 abi support has now been disabled. https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-5.15.y/arch/x86/configs/config-wsl#L593 https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.6.y/arch/x86/configs/config-wsl#L691
Any idea why?
@chessturo - can you please take a look?
4d72cb5bb5d14e520500e84316a5b7e0f9e572cf was the commit that changed this, if it helps
We're planning to fix this issue in the next kernel release. In the meantime, you can build a custom kernel with the config enabled as a workaround.
Thanks @chessturo!
Any idea why it was disabled for the previous kernel release?
Since the item name has changed, make olddefconfig has probably reverted it to "not set" that the default value.