[valgrind] [Bug 486180] [Valgrind][MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'

2024-04-26 Thread Nikita Leontiev
https://bugs.kde.org/show_bug.cgi?id=486180

--- Comment #3 from Nikita Leontiev  ---
I used clean source from tarball:

wget https://sourceware.org/pub/valgrind/valgrind-3.23.0.tar.bz2
tar xf valgrind-3.23.0.tar.bz2
cd valgrind-3.23.0
./configure --host=mipsel-linux --target=mipsel-linux
make

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 486180] New: [Valgrind][MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'

2024-04-26 Thread Nikita Leontiev
https://bugs.kde.org/show_bug.cgi?id=486180

Bug ID: 486180
   Summary: [Valgrind][MIPS] 'VexGuestArchState' has no member
named 'guest_IP_AT_SYSCALL'
Classification: Developer tools
   Product: valgrind
   Version: 3.23 GIT
  Platform: Compiled Sources
OS: Linux
Status: REPORTED
  Severity: critical
  Priority: NOR
 Component: general
  Assignee: jsew...@acm.org
  Reporter: nikita.leont...@gmail.com
  Target Milestone: ---

***
If you're not sure this is actually a bug, instead post about it at
https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Valgrind building fails when target arch is MIPS since change:
https://sourceware.org/git/?p=valgrind.git;a=commit;h=01d106084a8e2e3164a53b2f29cb0239a45bb81e

STEPS TO REPRODUCE
Build Valgrind for MIPS:

./configure --host=mipsel-linux --target=mipsel-linux
make

OBSERVED RESULT
Building failed:

m_scheduler/scheduler.c: In function 'handle_extension':
m_scheduler/scheduler.c:1238:32: error: 'VexGuestArchState' {aka 'struct
'} has no member named 'guest_IP_AT_SYSCALL'
   Addr addr = tst->arch.vex.guest_IP_AT_SYSCALL;

EXPECTED RESULT
Valgrind successfully built.

SOFTWARE/OS VERSIONS
Ubuntu 20.04
gcc: mipsel-linux-gcc 4.5.3, mipsel-linux-gcc 8.3.0

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 397670] [Helgrind] False positive race detected with sig_atomic_t

2019-02-07 Thread Nikita Leontiev
https://bugs.kde.org/show_bug.cgi?id=397670

Nikita Leontiev  changed:

   What|Removed |Added

 CC||nikita.leont...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 400793] pthread_rwlock_timedwrlock false positive

2019-02-07 Thread Nikita Leontiev
https://bugs.kde.org/show_bug.cgi?id=400793

Nikita Leontiev  changed:

   What|Removed |Added

 CC||nikita.leont...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 397670] New: [Helgrind] False positive race detected with sig_atomic_t

2018-08-20 Thread Nikita Leontiev
https://bugs.kde.org/show_bug.cgi?id=397670

Bug ID: 397670
   Summary: [Helgrind] False positive race detected with
sig_atomic_t
   Product: valgrind
   Version: 3.13.0
  Platform: Compiled Sources
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: helgrind
  Assignee: jsew...@acm.org
  Reporter: nikita.leont...@gmail.com
  Target Milestone: ---

Helgrind 3.13.0 detects false positive data race with sig_atomic_t in libev
4.19.
In ev_vars.h we have pipe_write_skipped defined as:

#define VARx(type,name) VAR(name, type name)
VARx(EV_ATOMIC_T, pipe_write_skipped)

ev.h:

#ifndef EV_ATOMIC_T
# include 
# define EV_ATOMIC_T sig_atomic_t volatile
#endif

Helgrind result:

==983== Possible data race during write of size 4 at 0x5BFD084 by thread #1
==983== Locks held: none
==983==at 0x50001C0: evpipe_write (ev.c:2237)
==983==by 0x5005515: ev_async_send (ev.c:4706)
...
==983== This conflicts with a previous read of size 4 by thread #3
==983== Locks held: none
==983==at 0x5002F5C: ev_run (ev.c:3407)
==983==by 0x5261607: ev_loop (ev.h:828)
...
==983==  Address 0x5bfd084 is 228 bytes inside a block of size 768 alloc'd
==983==at 0x483D4FC: malloc (vg_replace_malloc.c:298)
==983==by 0x483FDBB: realloc (vg_replace_malloc.c:785)
==983==by 0x4FFF4FD: ev_realloc_emul (ev.c:1518)
==983==by 0x4FFF54D: ev_realloc (ev.c:1535)
==983==by 0x5001DBD: ev_loop_new (ev.c:2878)
...

evpipe_write (ev.c:2237) is:

inline_speed void
evpipe_write (EV_P_ EV_ATOMIC_T *flag)
{
  ...
  pipe_write_skipped = 1;
  ...
}

and ev_run (ev.c:3407) is:

int
ev_run (EV_P_ int flags)
{
...
if (expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt ||
pipe_write_skipped)))
...
}

so both access performed on sig_atomic_t that's is thread safe.

-- 
You are receiving this mail because:
You are watching all bug changes.