This is what our Penal Code says about the right of self defence. Basically, the right to self defence is a full defence, meaning you will not be criminally liable at all (sections 96 and 97). There must also be a reasonable apprehension of danger, and the defence must not have exceeded what was necessary (s. 99). Further, if there is a reasonable apprehension of death or grievous hurt, the right of self defence extends to killing the assailant (s. 100). However, if in exercising the right of self defence you kill your assailant when it was unnecessary to do so, you will be criminally liable, though not for murder (section 300, exception 2). You will still get life imprisonment (in Singapore) or max 30 years imprisonment (in Malaysia) but not the death penalty.
Nothing done in private defence is an offence.
96. Nothing is an offence which is done in the exercise of the right of private defence.
Right of private defence of the body and of property.
97. Every person has a right, subject to the restrictions contained in section 99, to defend —
(a) his own body, and the body of any other person, against any offence affecting the human body;
(b) the property, whether movable or immovable, of himself or of any other person, against any act which is an offence falling under the definition of theft, robbery, mischief or criminal trespass, or which is an attempt to commit theft, robbery, mischief or criminal trespass.
Acts against which there is no right of private defence.
99. —
Extent to which the right may be exercised.
(4) The right of private defence in no case extends to the inflicting of more harm than it is necessary to inflict for the purpose of defence.
When the right of private defence of the body extends to causing death.
100. The right of private defence of the body extends, under the restrictions mentioned in section 99, to the voluntary causing of death or of any other harm to the assailant, if the offence which occasions the exercise of the right is of any of the following descriptions:
(a) such an assault as may reasonably cause the apprehension that death will otherwise be the consequence of such assault;
(b) such an assault as may reasonably cause the apprehension that grievous hurt will otherwise be the consequence of such assault;
(c) an assault with the intention of committing rape;
(d) an assault with the intention of committing non-consensual penile penetration of the anus;
(e) an assault with the intention of kidnapping or abducting;
(f) an assault with the intention of wrongfully confining a person, under circumstances which may reasonably cause him to apprehend that he will be unable to have recourse to the public authorities for his release.
S. 300
Exception 2.
Culpable homicide is not murder if the offender, in the exercise in good faith of the right of private defence of person or property, exceeds the power given to him by law, and causes the death of the person against whom he is exercising such right of defence, without premeditation and without any intention of doing more harm than is necessary for the purpose of such defence.