Actions
Bug #14346
closedloader: add __alloc_size2
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
The old version of cdefs.h and stdlib.h were using attribute((alloc_size(x))), the more recent compilers also do have attribute((alloc_size(n, x))), need to provide alias for it and fix stdlib.h use cases.
../../../../include/stdlib.h:91:14: warning: ignoring attribute 'alloc_size (2)' because it conflicts with previous 'alloc_size (1)' [-Wattributes] ../../../../include/stdlib.h:307:13: warning: ignoring attribute 'alloc_size (3)' because it conflicts with previous 'alloc_size (2)' [-Wattributes] ../../../../include/stdlib.h:91:14: warning: ignoring attribute 'alloc_size (2)' because it conflicts with previous 'alloc_size (1)' [-Wattributes] ../../../../include/stdlib.h:307:13: warning: ignoring attribute 'alloc_size (3)' because it conflicts with previous 'alloc_size (2)' [-Wattributes] ../../../../include/stdlib.h:91:14: warning: ignoring attribute 'alloc_size (2)' because it conflicts with previous 'alloc_size (1)' [-Wattributes] ../../../../include/stdlib.h:307:13: warning: ignoring attribute 'alloc_size (3)' because it conflicts with previous 'alloc_size (2)' [-Wattributes] ../../../../include/stdlib.h:91:14: warning: ignoring attribute 'alloc_size (2)' because it conflicts with previous 'alloc_size (1)' [-Wattributes] ../../../../include/stdlib.h:307:13: warning: ignoring attribute 'alloc_size (3)' because it conflicts with previous 'alloc_size (2)' [-Wattributes] ../../../../include/stdlib.h:91:14: warning: ignoring attribute 'alloc_size (2)' because it conflicts with previous 'alloc_size (1)' [-Wattributes] ../../../../include/stdlib.h:307:13: warning: ignoring attribute 'alloc_size (3)' because it conflicts with previous 'alloc_size (2)' [-Wattributes] ../../../../include/stdlib.h:91:14: warning: ignoring attribute 'alloc_size (2)' because it conflicts with previous 'alloc_size (1)' [-Wattributes] ../../../../include/stdlib.h:307:13: warning: ignoring attribute 'alloc_size (3)' because it conflicts with previous 'alloc_size (2)' [-Wattributes]
Should we use this attribute with our userland too?
Testing done: build/install/boot - nothing unexpected from loader commands.
Updated by Electric Monk 7 months ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 59c22e7a2e5efed7b82bdb64375da8627629d3e9
commit 59c22e7a2e5efed7b82bdb64375da8627629d3e9 Author: Toomas Soome <tsoome@me.com> Date: 2022-01-07T16:22:34.000Z 14346 loader: add __alloc_size2 Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Actions