Ticket #30258

Buffer overrun in BFGS::UpdateHessian

Open Date: 2012-12-04 22:26 Last Update: 2012-12-05 00:04

Reporter:
Owner:
(None)
Type:
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
6
Severity:
6
Resolution:
None
File:
None

Details

Buffer overrun error occurs if the dimension of the Hessian is odd number.

This bug is found on the binary built with OpenBLAS.

Ticket History (2/2 Histories)

2012-12-04 22:26 Updated by: ktns
  • New Ticket "Buffer overrun in BFGS::UpdateHessian" created
2012-12-05 00:04 Updated by: ktns
Comment

The code below reproduces this error.

This bug should be related to the byte alignment problem.

#include <cblas.h>
#include <stdlib.h>


int main(void){
	double *x = malloc(sizeof(double)*5);
	double *A = malloc(sizeof(double)*25);
	for(int i = 0; i<5 ; i++){
		x[i]=i;
	}

	for(int i = 0; i<25; i++){
		A[i]=0;
	}

	cblas_dsyr(CblasRowMajor, CblasUpper,
			5, 1, x, 1, A, 5);

	free(x);
	free(A);
	return 0;
}

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login