varnishcache / varnish-cache

Varnish Cache source code repository
https://www.varnish-cache.org
Other
3.65k stars 374 forks source link

vdef: introduce v_counted_by_(field) #4039

Open asadsa92 opened 8 months ago

asadsa92 commented 8 months ago

A new attribute can be used for flexible arrays to make the compiler smarter:

This would improve the array bound sanitizer.

Note: this has not been tested locally, but this should be safe until a compiler supports it. Once supported, we would detect and make the adjustments as needed.

nigoroll commented 8 months ago

I am generally 👍🏽 , this could potentially increase our code quality. BUT

this has not been tested locally

locally installing gcc-trunk and testing the changes should not be asking too much, rather than putting the burdon on a future incarnation of some other maintainer.

asadsa92 commented 8 months ago

this has not been tested locally

locally installing gcc-trunk and testing the changes should not be asking too much, rather than putting the burdon on a future incarnation of some other maintainer.

I agree with the reasoning to test it before merge to not uncover work later on, I was partly thinking this could be easily tested in CCI. The attribute is maybe too new. Anyways, thanks, I will look into it.

gquintard commented 1 month ago

@asadsa92 , do you need help with this?

asadsa92 commented 1 month ago

@gquintard No, but thanks for the reminder. I have added this to my backlog, I will come to it soon.