Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: CODECHAL_ENC_HEVC_B_MB_ENC_CURBE_G9[0] [-Werror=array-bounds=] #1770

Open
kwizart opened this issue Feb 2, 2024 · 2 comments
Open
Assignees
Labels
Encode video encode related HEVC HEVC

Comments

@kwizart
Copy link

kwizart commented Feb 2, 2024

Which component impacted?

Build

Is it regression? Good in old configuration?

No, this issue exist a long time

What happened?

Building current media-driver with -Werror leads to the following build failure on fedora 40 x86_64:

struct CODECHAL_ENC_HEVC_B_MB_ENC_CURBE_G9[0]’ is partly outside array bounds of ‘uint32_t[56]’ [-Werror=array-bounds=]

/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp: In member function ‘CodechalEncHevcStateG9::SetupBrcConstantTable(MOS_SURFACE*)’:
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:6193:23: error: array subscript ‘struct CODECHAL_ENC_HEVC_B_MB_ENC_CURBE_G9[0]’ is partly outside array bounds of ‘uint32_t[56]’ [-Werror=array-bounds=]
 6193 |         if(curbe->DW3.BlockBasedSkipEnable)
      |                       ^~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:2950:16: note: object ‘CodechalEncHevcStateG9::m_encBTu7PCurbeInit’ of size 224
 2950 | const uint32_t CodechalEncHevcStateG9::m_encBTu7PCurbeInit[56] =
      |                ^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:2893:16: note: object ‘CodechalEncHevcStateG9::m_encBTu1BCurbeInit’ of size 224
 2893 | const uint32_t CodechalEncHevcStateG9::m_encBTu1BCurbeInit[56] =
      |                ^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:2938:16: note: object ‘CodechalEncHevcStateG9::m_encBTu4PCurbeInit’ of size 224
 2938 | const uint32_t CodechalEncHevcStateG9::m_encBTu4PCurbeInit[56] =
      |                ^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:2926:16: note: object ‘CodechalEncHevcStateG9::m_encBTu1PCurbeInit’ of size 224
 2926 | const uint32_t CodechalEncHevcStateG9::m_encBTu1PCurbeInit[56] =
      |                ^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:2904:16: note: object ‘CodechalEncHevcStateG9::m_encBTu4BCurbeInit’ of size 224
 2904 | const uint32_t CodechalEncHevcStateG9::m_encBTu4BCurbeInit[56] =
      |                ^~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/media-driver-intel-media-23.4.3/media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp:2915:16: note: object ‘CodechalEncHevcStateG9::m_encBTu7BCurbeInit’ of size 224
 2915 | const uint32_t CodechalEncHevcStateG9::m_encBTu7BCurbeInit[56] =
      |                ^~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

What's the usage scenario when you are seeing the problem?

Others

What impacted?

No response

Debug Information

No response

Do you want to contribute a patch to fix the issue?

No.

@kwizart
Copy link
Author

kwizart commented Feb 2, 2024

See also ##1450 (unsure if fixed nowadays)...

@Sherry-Lin Sherry-Lin assigned OttoYang and bai-isaac and unassigned Jexu and XinfengZhang Feb 19, 2024
@Sherry-Lin Sherry-Lin added Encode video encode related HEVC HEVC labels Feb 19, 2024
@intel-mediadev
Copy link
Contributor

Auto Created VSMGWL-72135 for further analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Encode video encode related HEVC HEVC
Projects
None yet
Development

No branches or pull requests

7 participants