Describe the bug
A line of code clearly has to dereference a pointer, where the above line prints it as NULL, and no exception is generated, when built with xcc.
To Reproduce
Use 95b128e and build an XTOS based firmware for TGL, then run it on an SDW platform. Observe the following log:
[ 223577.473958] ( 6.666667) c0 ipc src/ipc/ipc3/handler.c:1605 INFO ipc: new cmd 0x30130000
[ 223598.463542] ( 20.989584) c0 pipe 1.3 ......./pipeline-graph.c:307 INFO pipeline complete, clock freq 400000000Hz
[ 223701.380208] ( 102.916664) c0 ipc src/ipc/ipc3/handler.c:1605 INFO ipc: new cmd 0x60010000
[ 223714.296875] ( 12.916667) c0 pipe 30.53 ....../pipeline-params.c:246 INFO pipe params dir 0 frame_fmt 0 buffer_fmt 0 rate 48000
[ 223723.619792] ( 9.322917) c0 pipe 30.53 ....../pipeline-params.c:250 INFO pipe params stream_tag 1 channels 2 sample_valid_bytes 2 sample_container_bytes 2
[ 223844.973958] ( 121.354164) c0 dai 1.2 src/ipc/ipc3/dai.c:109 INFO dai_data_config() dai type = 4 index = 2 dd 0x9e11e400
[ 223855.052083] ( 10.078125) c0 dai 1.2 src/ipc/ipc3/dai.c:142 INFO DMA buffer (nil)
[ 223881.015625] ( 25.963541) c0 dai 1.2 src/audio/dai-legacy.c:362 INFO dai_playback_params() dest_dev = 22 stream_id = 7 src_width = 4 dest_width = 4
[ 223891.197917] ( 10.182292) c0 dai 1.2 src/audio/dai-legacy.c:368 INFO dai_playback_params() fifo 0x7141c
[ 223906.848958] ( 15.651042) c0 pipe 30.53 ....../pipeline-params.c:343 INFO pipe prepare
[ 223982.656250] ( 75.807289) c0 dai 1.2 src/audio/dai-legacy.c:655 INFO dai_prepare()
[ 223992.734375] ( 10.078125) c0 dai 1.2 src/audio/dai-legacy.c:621 INFO dai_config_prepare(), channel = 7
[ 224001.875000] ( 9.140625) c0 dw-dma src/drivers/dw/dma.c:194 INFO dw_dma_channel_get(): dma 0 request channel 7
[ 224011.979167] ( 10.104167) c0 dai 1.2 src/audio/dai-legacy.c:640 INFO dai_config_prepare(): new configured dma channel index 0
specifically see this line:
[ 223855.052083] ( 10.078125) c0 dai 1.2 src/ipc/ipc3/dai.c:142 INFO DMA buffer (nil)
which is produced by this code:
|
comp_info(dev, "DMA buffer %p", dd->dma_buffer); |
|
dd->dma_buffer->stream.frame_fmt = dev->ipc_config.frame_fmt; |
where the next line after the print dereferences the NULL pointer, and no exception happens. A full log is attached.
Reproduction Rate
100%
Expected behavior
A DSP exception should be triggered.
Impact
The compiler seems to have a severe bug
Environment
- Name of the topology file
- Topology: sof-tgl-rt711-rt1316-rt714.tplg
- Name of the platform(s) on which the bug is observed.
- Platform: jf-tglu-sku0a32-sdca-02
sof-coherent-null.txt
Describe the bug
A line of code clearly has to dereference a pointer, where the above line prints it as NULL, and no exception is generated, when built with xcc.
To Reproduce
Use 95b128e and build an XTOS based firmware for TGL, then run it on an SDW platform. Observe the following log:
specifically see this line:
[ 223855.052083] ( 10.078125) c0 dai 1.2 src/ipc/ipc3/dai.c:142 INFO DMA buffer (nil)which is produced by this code:
sof/src/ipc/ipc3/dai.c
Lines 142 to 143 in 95b128e
where the next line after the print dereferences the NULL pointer, and no exception happens. A full log is attached.
Reproduction Rate
100%
Expected behavior
A DSP exception should be triggered.
Impact
The compiler seems to have a severe bug
Environment
sof-coherent-null.txt