mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Disable DEFAULT_TO_THREADED_CHECKER until race condition is found
This commit is contained in:
+13
-13
@@ -140,7 +140,7 @@ void report_windows_product_type(DWORD ProductType) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gb_printf("Unknown Edition (%08x)", ProductType);
|
gb_printf("Unknown Edition (%08x)", cast(unsigned)ProductType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -316,14 +316,14 @@ void print_bug_report_help() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (false) {
|
if (false) {
|
||||||
gb_printf("dwMajorVersion: %d\n", osvi.dwMajorVersion);
|
gb_printf("dwMajorVersion: %u\n", cast(unsigned)osvi.dwMajorVersion);
|
||||||
gb_printf("dwMinorVersion: %d\n", osvi.dwMinorVersion);
|
gb_printf("dwMinorVersion: %u\n", cast(unsigned)osvi.dwMinorVersion);
|
||||||
gb_printf("dwBuildNumber: %d\n", osvi.dwBuildNumber);
|
gb_printf("dwBuildNumber: %u\n", cast(unsigned)osvi.dwBuildNumber);
|
||||||
gb_printf("dwPlatformId: %d\n", osvi.dwPlatformId);
|
gb_printf("dwPlatformId: %u\n", cast(unsigned)osvi.dwPlatformId);
|
||||||
gb_printf("wServicePackMajor: %d\n", osvi.wServicePackMajor);
|
gb_printf("wServicePackMajor: %u\n", cast(unsigned)osvi.wServicePackMajor);
|
||||||
gb_printf("wServicePackMinor: %d\n", osvi.wServicePackMinor);
|
gb_printf("wServicePackMinor: %u\n", cast(unsigned)osvi.wServicePackMinor);
|
||||||
gb_printf("wSuiteMask: %d\n", osvi.wSuiteMask);
|
gb_printf("wSuiteMask: %u\n", cast(unsigned)osvi.wSuiteMask);
|
||||||
gb_printf("wProductType: %d\n", osvi.wProductType);
|
gb_printf("wProductType: %u\n", cast(unsigned)osvi.wProductType);
|
||||||
}
|
}
|
||||||
|
|
||||||
gb_printf("Windows ");
|
gb_printf("Windows ");
|
||||||
@@ -441,18 +441,18 @@ void print_bug_report_help() {
|
|||||||
TEXT("DisplayVersion"),
|
TEXT("DisplayVersion"),
|
||||||
RRF_RT_REG_SZ,
|
RRF_RT_REG_SZ,
|
||||||
ValueType,
|
ValueType,
|
||||||
&DisplayVersion,
|
DisplayVersion,
|
||||||
&ValueSize
|
&ValueSize
|
||||||
);
|
);
|
||||||
|
|
||||||
if (status == 0x0) {
|
if (status == 0x0) {
|
||||||
gb_printf(" (version: %s)", &DisplayVersion);
|
gb_printf(" (version: %s)", DisplayVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Now print build number.
|
Now print build number.
|
||||||
*/
|
*/
|
||||||
gb_printf(", build %d", osvi.dwBuildNumber);
|
gb_printf(", build %u", cast(unsigned)osvi.dwBuildNumber);
|
||||||
|
|
||||||
ValueSize = sizeof(UBR);
|
ValueSize = sizeof(UBR);
|
||||||
status = RegGetValue(
|
status = RegGetValue(
|
||||||
@@ -466,7 +466,7 @@ void print_bug_report_help() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (status == 0x0) {
|
if (status == 0x0) {
|
||||||
gb_printf(".%d", UBR);
|
gb_printf(".%u", cast(unsigned)UBR);
|
||||||
}
|
}
|
||||||
gb_printf("\n");
|
gb_printf("\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// #if defined(GB_SYSTEM_WINDOWS)
|
// #if defined(GB_SYSTEM_WINDOWS)
|
||||||
#define DEFAULT_TO_THREADED_CHECKER
|
// #define DEFAULT_TO_THREADED_CHECKER
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
enum TargetOsKind {
|
enum TargetOsKind {
|
||||||
|
|||||||
+4
-5
@@ -1286,7 +1286,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
|
|||||||
using_entities.allocator = heap_allocator();
|
using_entities.allocator = heap_allocator();
|
||||||
defer (array_free(&using_entities));
|
defer (array_free(&using_entities));
|
||||||
|
|
||||||
MUTEX_GUARD_BLOCK(ctx->scope->mutex) {
|
{
|
||||||
if (type->Proc.param_count > 0) {
|
if (type->Proc.param_count > 0) {
|
||||||
TypeTuple *params = &type->Proc.params->Tuple;
|
TypeTuple *params = &type->Proc.params->Tuple;
|
||||||
for_array(i, params->variables) {
|
for_array(i, params->variables) {
|
||||||
@@ -1303,7 +1303,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
|
|||||||
if (t->kind == Type_Struct) {
|
if (t->kind == Type_Struct) {
|
||||||
Scope *scope = t->Struct.scope;
|
Scope *scope = t->Struct.scope;
|
||||||
GB_ASSERT(scope != nullptr);
|
GB_ASSERT(scope != nullptr);
|
||||||
for_array(i, scope->elements.entries) {
|
MUTEX_GUARD_BLOCK(scope->mutex) for_array(i, scope->elements.entries) {
|
||||||
Entity *f = scope->elements.entries[i].value;
|
Entity *f = scope->elements.entries[i].value;
|
||||||
if (f->kind == Entity_Variable) {
|
if (f->kind == Entity_Variable) {
|
||||||
Entity *uvar = alloc_entity_using_variable(e, f->token, f->type, nullptr);
|
Entity *uvar = alloc_entity_using_variable(e, f->token, f->type, nullptr);
|
||||||
@@ -1321,11 +1321,10 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MUTEX_GUARD_BLOCK(ctx->scope->mutex) for_array(i, using_entities) {
|
||||||
for_array(i, using_entities) {
|
|
||||||
Entity *e = using_entities[i].e;
|
Entity *e = using_entities[i].e;
|
||||||
Entity *uvar = using_entities[i].uvar;
|
Entity *uvar = using_entities[i].uvar;
|
||||||
Entity *prev = scope_insert(ctx->scope, uvar);
|
Entity *prev = scope_insert(ctx->scope, uvar, false);
|
||||||
if (prev != nullptr) {
|
if (prev != nullptr) {
|
||||||
error(e->token, "Namespace collision while 'using' procedure argument '%.*s' of: %.*s", LIT(e->token.string), LIT(prev->token.string));
|
error(e->token, "Namespace collision while 'using' procedure argument '%.*s' of: %.*s", LIT(e->token.string), LIT(prev->token.string));
|
||||||
error_line("%.*s != %.*s\n", LIT(uvar->token.string), LIT(prev->token.string));
|
error_line("%.*s != %.*s\n", LIT(uvar->token.string), LIT(prev->token.string));
|
||||||
|
|||||||
+5
-5
@@ -446,7 +446,7 @@ Entity *scope_lookup(Scope *s, String const &name) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Entity *scope_insert_with_name(Scope *s, String const &name, Entity *entity) {
|
Entity *scope_insert_with_name(Scope *s, String const &name, Entity *entity, bool use_mutex=true) {
|
||||||
if (name == "") {
|
if (name == "") {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -454,8 +454,8 @@ Entity *scope_insert_with_name(Scope *s, String const &name, Entity *entity) {
|
|||||||
Entity **found = nullptr;
|
Entity **found = nullptr;
|
||||||
Entity *result = nullptr;
|
Entity *result = nullptr;
|
||||||
|
|
||||||
mutex_lock(&s->mutex);
|
if (use_mutex) mutex_lock(&s->mutex);
|
||||||
defer (mutex_unlock(&s->mutex));
|
defer (if (use_mutex) mutex_unlock(&s->mutex));
|
||||||
|
|
||||||
found = string_map_get(&s->elements, key);
|
found = string_map_get(&s->elements, key);
|
||||||
|
|
||||||
@@ -485,9 +485,9 @@ end:;
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity *scope_insert(Scope *s, Entity *entity) {
|
Entity *scope_insert(Scope *s, Entity *entity, bool use_mutex) {
|
||||||
String name = entity->token.string;
|
String name = entity->token.string;
|
||||||
return scope_insert_with_name(s, name, entity);
|
return scope_insert_with_name(s, name, entity, use_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -423,7 +423,7 @@ Entity *entity_of_node(Ast *expr);
|
|||||||
Entity *scope_lookup_current(Scope *s, String const &name);
|
Entity *scope_lookup_current(Scope *s, String const &name);
|
||||||
Entity *scope_lookup (Scope *s, String const &name);
|
Entity *scope_lookup (Scope *s, String const &name);
|
||||||
void scope_lookup_parent (Scope *s, String const &name, Scope **scope_, Entity **entity_);
|
void scope_lookup_parent (Scope *s, String const &name, Scope **scope_, Entity **entity_);
|
||||||
Entity *scope_insert (Scope *s, Entity *entity);
|
Entity *scope_insert (Scope *s, Entity *entity, bool use_mutex=true);
|
||||||
|
|
||||||
|
|
||||||
void add_type_and_value (CheckerInfo *i, Ast *expression, AddressingMode mode, Type *type, ExactValue value);
|
void add_type_and_value (CheckerInfo *i, Ast *expression, AddressingMode mode, Type *type, ExactValue value);
|
||||||
|
|||||||
Reference in New Issue
Block a user