Bug 105100 - valgrind reports multiple issues.
Summary: valgrind reports multiple issues.
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 20:19 UTC by Mike Mestnik
Modified: 2018-02-14 20:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Mestnik 2018-02-14 20:19:52 UTC
https://pastebin.com/TMc2wFE6

From the following we can see vkCreateDevice results in 4 bytes being written to unallocated memory and vkDestroyDevice reading from 4 bytes.

cheako@debian:~/src/github/cheako-vulkan$ make test
rm -f vulkan_test
cc -g -Wall    vulkan_test.c  -lvulkan -o vulkan_test
valgrind ./vulkan_test
==11915== Memcheck, a memory error detector
==11915== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==11915== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==11915== Command: ./vulkan_test
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4F01B94: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c000 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4F01BAB: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c004 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4831F32: memcpy (vg_replace_strmem.c:1019)
==11915==    by 0x4F188B7: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c000 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64B6: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c004 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64BD: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c00c is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64C4: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c008 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64C7: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c020 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64CF: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c014 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64DC: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c010 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64DF: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c018 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF64E5: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c01c is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid write of size 4
==11915==    at 0x4EF6512: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F18A17: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F40DBA: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01D89: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x486F0A8: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4875E1A: ??? (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x4878C2A: vkCreateDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C37: main (vulkan_test.c:119)
==11915==  Address 0xf7f3c000 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid read of size 4
==11915==    at 0x4EF6273: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01F3F: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x487C70D: vkDestroyDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C76: main (vulkan_test.c:124)
==11915==  Address 0xf7f3c000 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid read of size 4
==11915==    at 0x4EF6275: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01F3F: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x487C70D: vkDestroyDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C76: main (vulkan_test.c:124)
==11915==  Address 0xf7f3c004 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid read of size 4
==11915==    at 0x4EF6278: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01F3F: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x487C70D: vkDestroyDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C76: main (vulkan_test.c:124)
==11915==  Address 0xf7f3c018 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid read of size 4
==11915==    at 0x4EF627B: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01F3F: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x487C70D: vkDestroyDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C76: main (vulkan_test.c:124)
==11915==  Address 0xf7f3c014 is not stack'd, malloc'd or (recently) free'd
==11915==
==11915== Invalid read of size 4
==11915==    at 0x4EF627E: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x4F01F3F: ??? (in /usr/lib/i386-linux-gnu/libvulkan_intel.so)
==11915==    by 0x487C70D: vkDestroyDevice (in /usr/lib/i386-linux-gnu/libvulkan.so.1.0.39)
==11915==    by 0x108C76: main (vulkan_test.c:124)
==11915==  Address 0xf7f3c01c is not stack'd, malloc'd or (recently) free'd
==11915==
==11915==
==11915== HEAP SUMMARY:
==11915==     in use at exit: 94,176 bytes in 1,357 blocks
==11915==   total heap usage: 5,461 allocs, 4,104 frees, 2,565,652 bytes allocated
==11915==
==11915== LEAK SUMMARY:
==11915==    definitely lost: 48 bytes in 2 blocks
==11915==    indirectly lost: 9,098 bytes in 260 blocks
==11915==      possibly lost: 0 bytes in 0 blocks
==11915==    still reachable: 85,030 bytes in 1,095 blocks
==11915==         suppressed: 0 bytes in 0 blocks
==11915== Rerun with --leak-check=full to see details of leaked memory
==11915==
==11915== For counts of detected and suppressed errors, rerun with: -v
==11915== ERROR SUMMARY: 36 errors from 17 contexts (suppressed: 0 from 0)
cheako@debian:~/src/github/cheako-vulkan$
Comment 1 Jason Ekstrand 2018-02-14 20:23:14 UTC
If you want it to valgrind clean, you have to build with valgrind support.  You can do this by building the driver with the valgrind headers available.  If you do build with valgrind support, it reports basically nothing on most tests.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.