Skip to content

Set default result in TPCUWriter.IsExternalEl

Jinyang He requested to merge MQ-mengqing/source:la-other-fix into main

Summary

Set default result in TPCUWriter.IsExternalEl

What is the current bug behavior?

Current the TPCUWriter.IsExternalEl has no default return value if El is nil. I tested it on x86_64, and it return true when El is nil, because it directly with uninitialized regs which is not zero.

0000000000732210 <PAS2JSFILER$_$TPCUWRITER_$__$$_ISEXTERNALEL$TPASELEMENT$$BOOLEAN>:
  732210:       53                      push   %rbx
  732211:       41 54                   push   %r12
  732213:       41 55                   push   %r13
  732215:       41 56                   push   %r14
  732217:       50                      push   %rax
  732218:       48 89 fb                mov    %rdi,%rbx
  73221b:       49 89 f4                mov    %rsi,%r12
  73221e:       e9 62 00 00 00          jmpq   732285 <PAS2JSFILER$_$TPCUWRITER_$__$$_ISEXTERNALEL$TPASELEMENT$$BOOLEAN+0x75>

  ...

  732285:       4d 85 e4                test   %r12,%r12
  732288:       75 9e                   jne    732228 <PAS2JSFILER$_$TPCUWRITER_$__$$_ISEXTERNALEL$TPASELEMENT$$BOOLEAN+0x18>
  73228a:       44 88 f0                mov    %r14b,%al                         <- uninitialized
  73228d:       59                      pop    %rcx
  73228e:       41 5e                   pop    %r14
  732290:       41 5d                   pop    %r13
  732292:       41 5c                   pop    %r12
  732294:       5b                      pop    %rbx
  732295:       c3                      retq

Merge request reports