mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-26 15:34:59 -07:00
Add sanitize_address attribute to all normal packages
This commit is contained in:
@@ -152,7 +152,6 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
|
||||
lb_add_attribute_to_proc(m, p->value, "noredzone");
|
||||
}
|
||||
|
||||
|
||||
switch (p->inlining) {
|
||||
case ProcInlining_inline:
|
||||
lb_add_attribute_to_proc(m, p->value, "alwaysinline");
|
||||
@@ -318,6 +317,12 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
|
||||
}
|
||||
}
|
||||
|
||||
if (p->body && entity->pkg && (entity->pkg->kind == Package_Normal) || (entity->pkg->kind == Package_Init)) {
|
||||
if (build_context.sanitizer_flags & SanitizerFlag_Address) {
|
||||
lb_add_attribute_to_proc(m, p->value, "sanitize_address");
|
||||
}
|
||||
}
|
||||
|
||||
lbValue proc_value = {p->value, p->type};
|
||||
lb_add_entity(m, entity, proc_value);
|
||||
lb_add_member(m, p->name, proc_value);
|
||||
|
||||
Reference in New Issue
Block a user