authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-04 10:56:32+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-04 10:56:32+01:00
log4050d9bbf918dee0195e88d57b653e89d5e25372
tree0831bff81d2ed32c8ad4c96b310acc31eb7e90e4
parent3054486d1dedd49553680da2c074d1ab413797fd
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.valgrind: Fix some compile errors.


2 files changed, 8 insertions(+), 8 deletions(-)

lib/std/valgrind.zig+2-2
...@@ -121,7 +121,7 @@ pub fn discardTranslations(qzz: []const u8) void {...@@ -121,7 +121,7 @@ pub fn discardTranslations(qzz: []const u8) void {
121}121}
122122
123pub fn innerThreads(qzz: [*]u8) void {123pub fn innerThreads(qzz: [*]u8) void {
124 doClientRequestStmt(.InnerThreads, qzz, 0, 0, 0, 0);124 doClientRequestStmt(.InnerThreads, @intFromPtr(qzz), 0, 0, 0, 0);
125}125}
126126
127pub fn nonSimdCall0(func: fn (usize) usize) usize {127pub fn nonSimdCall0(func: fn (usize) usize) usize {
...@@ -273,7 +273,7 @@ pub fn enableErrorReporting() void {...@@ -273,7 +273,7 @@ pub fn enableErrorReporting() void {
273/// If no connection is opened, output will go to the log output.273/// If no connection is opened, output will go to the log output.
274/// Returns 1 if command not recognised, 0 otherwise.274/// Returns 1 if command not recognised, 0 otherwise.
275pub fn monitorCommand(command: [*]u8) bool {275pub fn monitorCommand(command: [*]u8) bool {
276 return doClientRequestExpr(0, .GdbMonitorCommand, @intFromPtr(command.ptr), 0, 0, 0, 0) != 0;276 return doClientRequestExpr(0, .GdbMonitorCommand, @intFromPtr(command), 0, 0, 0, 0) != 0;
277}277}
278278
279pub const memcheck = @import("valgrind/memcheck.zig");279pub const memcheck = @import("valgrind/memcheck.zig");
lib/std/valgrind/memcheck.zig+6-6
...@@ -90,26 +90,26 @@ pub fn checkMemIsDefined(qzz: []const u8) usize {...@@ -90,26 +90,26 @@ pub fn checkMemIsDefined(qzz: []const u8) usize {
9090
91/// Do a full memory leak check (like --leak-check=full) mid-execution.91/// Do a full memory leak check (like --leak-check=full) mid-execution.
92pub fn doLeakCheck() void {92pub fn doLeakCheck() void {
93 doClientRequestStmt(.DO_LEAK_CHECK, 0, 0, 0, 0, 0);93 doClientRequestStmt(.DoLeakCheck, 0, 0, 0, 0, 0);
94}94}
9595
96/// Same as doLeakCheck() but only showing the entries for96/// Same as doLeakCheck() but only showing the entries for
97/// which there was an increase in leaked bytes or leaked nr of blocks97/// which there was an increase in leaked bytes or leaked nr of blocks
98/// since the previous leak search.98/// since the previous leak search.
99pub fn doAddedLeakCheck() void {99pub fn doAddedLeakCheck() void {
100 doClientRequestStmt(.DO_LEAK_CHECK, 0, 1, 0, 0, 0);100 doClientRequestStmt(.DoLeakCheck, 0, 1, 0, 0, 0);
101}101}
102102
103/// Same as doAddedLeakCheck() but showing entries with103/// Same as doAddedLeakCheck() but showing entries with
104/// increased or decreased leaked bytes/blocks since previous leak104/// increased or decreased leaked bytes/blocks since previous leak
105/// search.105/// search.
106pub fn doChangedLeakCheck() void {106pub fn doChangedLeakCheck() void {
107 doClientRequestStmt(.DO_LEAK_CHECK, 0, 2, 0, 0, 0);107 doClientRequestStmt(.DoLeakCheck, 0, 2, 0, 0, 0);
108}108}
109109
110/// Do a summary memory leak check (like --leak-check=summary) mid-execution.110/// Do a summary memory leak check (like --leak-check=summary) mid-execution.
111pub fn doQuickLeakCheck() void {111pub fn doQuickLeakCheck() void {
112 doClientRequestStmt(.DO_LEAK_CHECK, 1, 0, 0, 0, 0);112 doClientRequestStmt(.DoLeakCheck, 1, 0, 0, 0, 0);
113}113}
114114
115/// Return number of leaked, dubious, reachable and suppressed bytes found by115/// Return number of leaked, dubious, reachable and suppressed bytes found by
...@@ -191,7 +191,7 @@ test countLeakBlocks {...@@ -191,7 +191,7 @@ test countLeakBlocks {
191/// impossible to segfault your system by using this call.191/// impossible to segfault your system by using this call.
192pub fn getVbits(zza: []u8, zzvbits: []u8) u2 {192pub fn getVbits(zza: []u8, zzvbits: []u8) u2 {
193 std.debug.assert(zzvbits.len >= zza.len / 8);193 std.debug.assert(zzvbits.len >= zza.len / 8);
194 return @as(u2, @intCast(doClientRequestExpr(0, .GetVbits, @intFromPtr(zza.ptr), @intFromPtr(zzvbits), zza.len, 0, 0)));194 return @as(u2, @intCast(doClientRequestExpr(0, .GetVbits, @intFromPtr(zza.ptr), @intFromPtr(zzvbits.ptr), zza.len, 0, 0)));
195}195}
196196
197/// Set the validity data for addresses zza, copying it197/// Set the validity data for addresses zza, copying it
...@@ -204,7 +204,7 @@ pub fn getVbits(zza: []u8, zzvbits: []u8) u2 {...@@ -204,7 +204,7 @@ pub fn getVbits(zza: []u8, zzvbits: []u8) u2 {
204/// impossible to segfault your system by using this call.204/// impossible to segfault your system by using this call.
205pub fn setVbits(zzvbits: []u8, zza: []u8) u2 {205pub fn setVbits(zzvbits: []u8, zza: []u8) u2 {
206 std.debug.assert(zzvbits.len >= zza.len / 8);206 std.debug.assert(zzvbits.len >= zza.len / 8);
207 return @as(u2, @intCast(doClientRequestExpr(0, .SetVbits, @intFromPtr(zza.ptr), @intFromPtr(zzvbits), zza.len, 0, 0)));207 return @as(u2, @intCast(doClientRequestExpr(0, .SetVbits, @intFromPtr(zza.ptr), @intFromPtr(zzvbits.ptr), zza.len, 0, 0)));
208}208}
209209
210/// Disable and re-enable reporting of addressing errors in the210/// Disable and re-enable reporting of addressing errors in the