Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luv test error #188

Closed
mythay opened this issue Oct 21, 2015 · 3 comments
Closed

luv test error #188

mythay opened this issue Oct 21, 2015 · 3 comments

Comments

@mythay
Copy link
Contributor

mythay commented Oct 21, 2015

When I compile luv in debug mode using vs2015 and run test, an error window was propmoted, the message is

Debug Error!
File: e:\github\luv\src\fs.c
Line:366

Runtime check failure #3 - the variable 'buf' is being used without being initialized.

I check the code, it seems that it is an error.

@creationix
Copy link
Member

When you get this runtime error are you passing a single string to write or a list of strings?

@mythay
Copy link
Contributor Author

mythay commented Oct 22, 2015

I just use lua tests\run.lua to do official test.
the output is like below when error occur

ok 13 fs - read a file sync            
  { fd = 3 }                           
  {                                    
    stat = {                           
      nlink = 1,                       
      ino = 158118,                    
      mtime = table: 0061A860,         
      gid = 0,                         
      mode = 33206,                    
      size = 5867,                     
      dev = 1688362289,                
      gen = 0,                         
      rdev = 0,                        
      atime = table: 0061A3B0,         
      blksize = 2048,                  
      uid = 0,                         
      type = "file",                   
      flags = 0,                       
      ctime = table: 0061A630,         
      birthtime = table: 0061A608,     
      blocks = 16                      
    }                                  
  }                                    
  { chunk = 5867 }                     
ok 14 fs - read a file async           

it seems this code

    uv.fs_write(fd, {"with\n", "more\n", "lines\n"}, -1)

cause this problem

@creationix
Copy link
Member

Yep, that's what I thought. Try with this patch and it should fix it 118f4b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants