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 {
121121}
122122
123123pub fn innerThreads(qzz: [*]u8) void {
124 doClientRequestStmt(.InnerThreads, qzz, 0, 0, 0, 0);
124 doClientRequestStmt(.InnerThreads, @intFromPtr(qzz), 0, 0, 0, 0);
125125}
126126
127127pub fn nonSimdCall0(func: fn (usize) usize) usize {
......@@ -273,7 +273,7 @@ pub fn enableErrorReporting() void {
273273/// If no connection is opened, output will go to the log output.
274274/// Returns 1 if command not recognised, 0 otherwise.
275275pub 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;
277277}
278278
279279pub const memcheck = @import("valgrind/memcheck.zig");
lib/std/valgrind/memcheck.zig+6-6
......@@ -90,26 +90,26 @@ pub fn checkMemIsDefined(qzz: []const u8) usize {
9090
9191/// Do a full memory leak check (like --leak-check=full) mid-execution.
9292pub fn doLeakCheck() void {
93 doClientRequestStmt(.DO_LEAK_CHECK, 0, 0, 0, 0, 0);
93 doClientRequestStmt(.DoLeakCheck, 0, 0, 0, 0, 0);
9494}
9595
9696/// Same as doLeakCheck() but only showing the entries for
9797/// which there was an increase in leaked bytes or leaked nr of blocks
9898/// since the previous leak search.
9999pub fn doAddedLeakCheck() void {
100 doClientRequestStmt(.DO_LEAK_CHECK, 0, 1, 0, 0, 0);
100 doClientRequestStmt(.DoLeakCheck, 0, 1, 0, 0, 0);
101101}
102102
103103/// Same as doAddedLeakCheck() but showing entries with
104104/// increased or decreased leaked bytes/blocks since previous leak
105105/// search.
106106pub fn doChangedLeakCheck() void {
107 doClientRequestStmt(.DO_LEAK_CHECK, 0, 2, 0, 0, 0);
107 doClientRequestStmt(.DoLeakCheck, 0, 2, 0, 0, 0);
108108}
109109
110110/// Do a summary memory leak check (like --leak-check=summary) mid-execution.
111111pub fn doQuickLeakCheck() void {
112 doClientRequestStmt(.DO_LEAK_CHECK, 1, 0, 0, 0, 0);
112 doClientRequestStmt(.DoLeakCheck, 1, 0, 0, 0, 0);
113113}
114114
115115/// Return number of leaked, dubious, reachable and suppressed bytes found by
......@@ -191,7 +191,7 @@ test countLeakBlocks {
191191/// impossible to segfault your system by using this call.
192192pub fn getVbits(zza: []u8, zzvbits: []u8) u2 {
193193 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)));
195195}
196196
197197/// Set the validity data for addresses zza, copying it
......@@ -204,7 +204,7 @@ pub fn getVbits(zza: []u8, zzvbits: []u8) u2 {
204204/// impossible to segfault your system by using this call.
205205pub fn setVbits(zzvbits: []u8, zza: []u8) u2 {
206206 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)));
208208}
209209
210210/// Disable and re-enable reporting of addressing errors in the