LINUX.ORG.RU

История изменений

Исправление fsb4000, (текущая версия) :

Поставил кое-где *, теперь компилируется под rustc 1.34.2

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=923a441a3f8675fce6431957bcfe6d72

Теперь запустил Valgrind:

  1. Мой вариант:
valgrind ./1
==2051== Memcheck, a memory error detector
==2051== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2051== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==2051== Command: ./1
==2051== 
true
==2051== 
==2051== HEAP SUMMARY:
==2051==     in use at exit: 0 bytes in 0 blocks
==2051==   total heap usage: 20 allocs, 20 frees, 3,441 bytes allocated
==2051== 
==2051== All heap blocks were freed -- no leaks are possible
==2051== 
==2051== For counts of detected and suppressed errors, rerun with: -v
==2051== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
  1. Ваш вариант, исправленный для компиляции rustc 1.34.2:
valgrind ./2
==2052== Memcheck, a memory error detector
==2052== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2052== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==2052== Command: ./2
==2052== 
true
==2052== 
==2052== HEAP SUMMARY:
==2052==     in use at exit: 0 bytes in 0 blocks
==2052==   total heap usage: 22 allocs, 22 frees, 3,449 bytes allocated
==2052== 
==2052== All heap blocks were freed -- no leaks are possible
==2052== 
==2052== For counts of detected and suppressed errors, rerun with: -v
==2052== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Собирал так:

rustc -C opt-level=3 2.rs
rustc -C opt-level=3 1.rs

Исходная версия fsb4000, :

Поставил кое-где *, теперь компилируется под rustc 1.34.2

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=923a441a3f8675fce6431957bcfe6d72

Теперь запустил Valgrind:

  1. Мой вариант:
valgrind ./1
==2051== Memcheck, a memory error detector
==2051== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2051== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==2051== Command: ./1
==2051== 
true
==2051== 
==2051== HEAP SUMMARY:
==2051==     in use at exit: 0 bytes in 0 blocks
==2051==   total heap usage: 20 allocs, 20 frees, 3,441 bytes allocated
==2051== 
==2051== All heap blocks were freed -- no leaks are possible
==2051== 
==2051== For counts of detected and suppressed errors, rerun with: -v
==2051== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
  1. Ваш вариант, исправленный для компиляции rustc 1.34.2:
valgrind ./2
==2052== Memcheck, a memory error detector
==2052== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2052== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==2052== Command: ./2
==2052== 
true
==2052== 
==2052== HEAP SUMMARY:
==2052==     in use at exit: 0 bytes in 0 blocks
==2052==   total heap usage: 22 allocs, 22 frees, 3,449 bytes allocated
==2052== 
==2052== All heap blocks were freed -- no leaks are possible
==2052== 
==2052== For counts of detected and suppressed errors, rerun with: -v
==2052== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)