Error with --no-huge when compiled with -fsanitize=address from gcc 15
Burakov, Anatoly
anatoly.burakov at intel.com
Fri Sep 5 11:17:43 CEST 2025
On 9/4/2025 4:49 PM, Robin Jarry wrote:
> Hey Anatoly,
>
> Burakov, Anatoly, Sep 04, 2025 at 16:35:
>> I have been trying to reproduce this but I'm unable to. I run some old
>> CentOS so I built GCC15 manually and tried reproducing with that. The
>> version I'm using is 15.2, could you please retest with latest GCC15 and
>> see if it was fixed?
>
> I am running on Fedora 42 that has GCC 15.2.1 and the problem persists.
>
>> (if not, I'll try to get a more recent distro and reproduce again)
>>
>> The DMA mask checking you're referring to is there for cases where e.g.
>> in a VM the emulated IOMMU will not have full address width (39 bits was
>> common at the time), and thus we couldn't use the full VA space for IOVA
>> addressing, and had to resort to using real physical addresses (because
>> kernel ensure those are to be within support range of IOMMU). Were you
>> running this test in a VM, by any chance?
>
> No I am running on a physical machine. I tested again without --no-huge
> and 2M/1G huge pages, and the issue persists as well.
>
> I tried both as root, and as a regular user.
>
It should work if you use --iova-mode=pa (even for VM case), this will
require root though. However, I don't quite get how you get the error
that you do.
Specifically, it's weird that your DMA width is 42 bits (indicated by
"using dma mask fffffc0000000000" log), running on a physical machine -
mine sits at 57 bits, so despite having VA's within the same range as
yours, this works on my machine because my DMA mask is much wider. Maybe
there's a kernel command-line of some sort that limits your DMA width?
At first glance I don't think the issue has anything to do with DPDK, at
least it doesn't look like it does to me. I do not see how DMA mask
width would be affected by libasan or GCC15, to me it sounds more like a
kernel configuration/HW setup problem.
--
Thanks,
Anatoly
More information about the dev
mailing list