pulsecore: Add exception judgment to fix the crash when playing music 44/248744/2 accepted/tizen/unified/20201203.123820 submit/tizen/20201202.174122
authorzhaochengyi <zhaochengyi@uniontech.com>
Sat, 18 Jul 2020 08:47:40 +0000 (16:47 +0800)
committerJaechul Lee <jcsing.lee@samsung.com>
Wed, 2 Dec 2020 05:57:13 +0000 (14:57 +0900)
commitd06f78273b93b48ad3c5e265c22fc300ccd774f5
tree77b68da9a87848d0f113d4565bafba362037ab59
parent1e358f59c21e42b41cf5b968bf5ed03054abc6b2
pulsecore: Add exception judgment to fix the crash when playing music

When playing music for a period of time, the Shared Memory is
frequently accessed, and occasionally read/write errors occur,
which causes the program to crash

[Current thread is 1 (Thread 0xffff86823010 (LWP 2841))]
(gdb) bt
0  0x0000ffff8702a714 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
1  0x0000ffff870188e8 in __GI_abort () at abort.c:79
2  0x0000ffff873b5728 in do_read (p=p@entry=0x3673a170, re=re@entry=0x3673a338) at pulsecore/pstream.c:856
3  0x0000ffff873b7fd8 in do_pstream_read_write (p=0x3673a170) at pulsecore/pstream.c:248
4  0x0000ffff873b8368 in srb_callback (srb=<optimized out>, userdata=0x3673a170) at pulsecore/pstream.c:287
5  0x0000ffff873b8bec in srbchannel_rwloop (sr=0x36766ae0) at pulsecore/srbchannel.c:190
6  0x0000ffff87339c70 in dispatch_pollfds (m=0x36670db0) at pulse/mainloop.c:655
7  0x0000ffff87339c70 in pa_mainloop_dispatch (m=m@entry=0x36670db0) at pulse/mainloop.c:898
8  0x0000ffff8733a01c in pa_mainloop_iterate (m=0x36670db0, block=<optimized out>, retval=0xffffd9683030) at pulse/mainloop.c:929
9  0x0000ffff8733a0d8 in pa_mainloop_run (m=m@entry=0x36670db0, retval=retval@entry=0xffffd9683030) at pulse/mainloop.c:945
10 0x0000000000406894 in main (argc=<optimized out>, argv=<optimized out>) at daemon/main.c:1144

[jcsing.lee: backport mainline commit b5a6365f1]
Signed-off-by: zhaochengyi <zhaochengyi@uniontech.com>
[Version] 13.0-24
[Issue Type] Bug fix

Change-Id: I7dae834ca8dc0038aa583d02f688fdfb22edca0a
packaging/pulseaudio.spec
src/pulsecore/pstream.c