Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831160 - media-libs/vulkan-loader-1.2.198.1 version bump
Summary: media-libs/vulkan-loader-1.2.198.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-13 23:57 UTC by Ao Shen
Modified: 2022-01-17 23:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ao Shen 2022-01-13 23:57:58 UTC
As of vulkan spec 1.2.193 the behavior of vkGetInstanceProcAddr is changed so that address of global commands (including vkGetInstanceProcAddr itself) can only be queried with a NULL instance.

Such change was enforced in media-libs/vulkan-loader upstream commit b9d0a4ffd78aa556304bb82e23182b1c82b173d9[1] and was contained in version 1.2.198 release. Later they noticed that it could break existing applications and decided to only enforce the said change from vulkan api 1.3 in upstream commit 143eb773e4e8bf227c56f7189b9091c6c512abb5[2], which is contained in releases from 1.2.202.

On the other hand, dev-util/vulkan-headers contains a usage that is rendered invalid by this change. Upstream addressed this issue in upstream commit 8e3a52edc0118cec70319dcb0ac2502232e1859a[3], which is contained in releases from 1.2.200.

Current version 1.2.198 of both packages in main tree happens to containing this combination that can lead to runtime crash of certain applications.

Reproducible: Always

Steps to Reproduce:
The following sample program

// test.cpp
#include <vulkan/vulkan_raii.hpp>
#include <iostream>

static std::string AppName    = "01_InitInstanceRAII";
static std::string EngineName = "Vulkan.hpp";

int main( int /*argc*/, char ** /*argv*/ )
{
  try
  {
    vk::raii::Context context;
    vk::ApplicationInfo applicationInfo( AppName.c_str(), 1, EngineName.c_str(), 1, VK_API_VERSION_1_1 );
    vk::InstanceCreateInfo instanceCreateInfo( {}, &applicationInfo );
    vk::raii::Instance instance( context, instanceCreateInfo );
  }
  catch (...)
  {
    std::cout << "unknown error\n";
    exit(1);
  }
  return 0;
}

compiled with 'g++ -o test test.cpp -lvulkan -ldl'
and try to run as './test'
Actual Results:  
A segmentation fault is triggered. Due to the said change, an internal pointer to vkGetInstanceProcAddr replaced by NULL, which is used to query other vulkan interface.


[1] https://github.com/KhronosGroup/Vulkan-Loader/commit/b9d0a4ffd78aa556304bb82e23182b1c82b173d9

[2] https://github.com/KhronosGroup/Vulkan-Loader/commit/143eb773e4e8bf227c56f7189b9091c6c512abb5

[3] https://github.com/KhronosGroup/Vulkan-Hpp/commit/8e3a52edc0118cec70319dcb0ac2502232e1859a
Comment 1 Ao Shen 2022-01-14 00:28:02 UTC
There is a Vulkan SDK release 1.2.198.1 (https://github.com/KhronosGroup/Vulkan-Loader/releases/tag/sdk-1.2.198.1) that cherry picked the fix.
Comment 2 Ionen Wolkens gentoo-dev 2022-01-14 03:58:02 UTC
(In reply to Ao Shen from comment #1)
> There is a Vulkan SDK release 1.2.198.1
> (https://github.com/KhronosGroup/Vulkan-Loader/releases/tag/sdk-1.2.198.1)
> that cherry picked the fix.
That's nice, bumping cherry picked sdk vulkan-loader should make things simpler for the maintainers.
Comment 3 Larry the Git Cow gentoo-dev 2022-01-17 23:09:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=615ae655ed634ac486ee77fd3efc801005e9a4d7

commit 615ae655ed634ac486ee77fd3efc801005e9a4d7
Author:     Nick Sarnie <sarnex@gentoo.org>
AuthorDate: 2022-01-17 23:06:49 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2022-01-17 23:08:39 +0000

    media-libs/vulkan-loader: Version bump
    
    Closes: https://bugs.gentoo.org/831160
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 media-libs/vulkan-loader/Manifest                  |  1 +
 .../vulkan-loader/vulkan-loader-1.2.198-r1.ebuild  | 67 ++++++++++++++++++++++
 2 files changed, 68 insertions(+)