Related: deb#766788 alloc on heap instead of stack

Change-Id: I0f103f535b99f185cfdd019a76709d5deaef1d13
(cherry picked from commit acdf54c4142b7a51b99eacacee470ac31d6ff0ae)