FreeBSD Bugzilla – Attachment 11230 Details for
Bug 22188
Patch to sys/alpha to add M_ZERO to appropriate malloc calls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.10 KB, created by
josh
on 2000-10-21 15:20:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
josh
Created:
2000-10-21 15:20:01 UTC
Size:
2.10 KB
patch
obsolete
>Index: alpha/interrupt.c >=================================================================== >RCS file: /usr/home/ncvs/src/sys/alpha/alpha/interrupt.c,v >retrieving revision 1.24 >diff -u -r1.24 interrupt.c >--- alpha/interrupt.c 2000/10/05 23:09:42 1.24 >+++ alpha/interrupt.c 2000/10/21 14:11:26 >@@ -371,11 +371,10 @@ > if (ithd == NULL || ithd->it_ih == NULL) { > /* first handler for this vector */ > if (ithd == NULL) { >- ithd = malloc(sizeof(struct ithd), M_DEVBUF, M_WAITOK); >+ ithd = malloc(sizeof(struct ithd), M_DEVBUF, M_WAITOK | M_ZERO); > if (ithd == NULL) > return ENOMEM; > >- bzero(ithd, sizeof(struct ithd)); > ithd->irq = vector; > ithd->it_md = i; > i->ithd = ithd; >@@ -410,10 +409,9 @@ > } > > /* Third, setup the interrupt descriptor for this handler. */ >- idesc = malloc(sizeof (struct intrec), M_DEVBUF, M_WAITOK); >+ idesc = malloc(sizeof (struct intrec), M_DEVBUF, M_WAITOK | M_ZERO); > if (idesc == NULL) > return ENOMEM; >- bzero(idesc, sizeof(struct intrec)); > > idesc->handler = handler; > idesc->argument = arg; >Index: osf1/imgact_osf1.c >=================================================================== >RCS file: /usr/home/ncvs/src/sys/alpha/osf1/imgact_osf1.c,v >retrieving revision 1.1 >diff -u -r1.1 imgact_osf1.c >--- osf1/imgact_osf1.c 1999/12/14 22:35:32 1.1 >+++ osf1/imgact_osf1.c 2000/10/21 14:12:02 >@@ -109,8 +109,7 @@ > printf("unknown ecoff magic %x\n", eap->magic); > return ENOEXEC; > } >- osf_auxargs = malloc(sizeof(Osf_Auxargs), M_TEMP, M_WAITOK); >- bzero(osf_auxargs, sizeof(Osf_Auxargs)); >+ osf_auxargs = malloc(sizeof(Osf_Auxargs), M_TEMP, M_WAITOK | M_ZERO); > imgp->auxargs = osf_auxargs; > osf_auxargs->executable = osf_auxargs->exec_path; > path_not_saved = copyinstr(imgp->fname, osf_auxargs->executable, >@@ -226,8 +225,7 @@ > raw_dend = (eap->data_start + eap->dsize); > if (dend > raw_dend) { > caddr_t zeros; >- zeros = malloc(dend-raw_dend,M_TEMP,M_WAITOK); >- bzero(zeros,dend-raw_dend); >+ zeros = malloc(dend-raw_dend,M_TEMP,M_WAITOK|M_ZERO); > if ((error = copyout(zeros, (caddr_t)raw_dend, > dend-raw_dend))) { > uprintf("Can't zero start of bss, error %d\n",error);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22188
: 11230